Description
domutils 1.5.0 before 4.1.0 contains a denial of service vulnerability in compareDocumentPosition() that takes quadratic time when building ancestor chains with unshift(). Attackers can supply HTML or XML documents with deeply nested elements that applications compare or sort via uniqueSort() to block the Node.js event loop.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
fb55 domutils
Default version status: unaffected
1.5.0 to < 4.1.0affected
pkg:npm/domutilsReferences
- https://github.com/fb55/domutils/security/advisories/GHSA-pvqx-4ghw-x6gp ↗
- https://github.com/fb55/domutils/commit/560a8d1886b8ac28872432b3bb368c19930a6c8f ↗
- https://github.com/fb55/domutils/releases/tag/v4.1.0 ↗
- https://github.com/fb55/domutils/blob/v4.0.2/src/helpers.ts#L79-L99 ↗
- https://www.vulncheck.com/advisories/domutils-1.5.0-before-4.1.0-denial-of-service-via-comparedocumentposition ↗