Skip to content

GHSA-9pgh-qqpf-7wqj CVE-2022-37616

Withdrawn: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in @xmldom/xmldom and xmldom

Critical Withdrawn Nov 8, 2022 npm
Severity
9.8 / 10
Critical · CVSS 3.1
Exploit chance (EPSS)
2.13%
Chance of exploitation in the next 30 days. Higher than 82.00% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-1321 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Fix
0.8.3
Upgrade @xmldom/xmldom to this version or later

Description

Withdrawn

This advisory has been withdrawn because the maintainers of @xmldom/xmldom and multiple third parties disputed the validity of the issue. Attempts to create or replicate a proof of concept have been unsuccessful.

Original Description

Impact

A prototype pollution vulnerability exists in the function copy in dom.js in the xmldom (published as @xmldom/xmldom) package.

Patches

Update to @xmldom/xmldom@~0.7.6, @xmldom/xmldom@~0.8.3 (dist-tag latest) or @xmldom/xmldom@>=0.9.0-beta.2 (dist-tag next).

Workarounds

None

References

https://github.com/xmldom/xmldom/pull/437

For more information

If you have any questions or comments about this advisory:

Affected versions

npm

PackageVulnerableFixed in
@xmldom/xmldom
>= 0.8.0, < 0.8.3
0.8.3
@xmldom/xmldom
>= 0.9.0-beta.1, < 0.9.0-beta.2
0.9.0-beta.2
@xmldom/xmldom
< 0.7.6
0.7.6
xmldom
<= 0.6.0
No fix yet

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

@xmldom/xmldom npm → 0.8.3

npm
npm install @xmldom/xmldom@0.8.3
yarn
yarn add @xmldom/xmldom@0.8.3
pnpm
pnpm add @xmldom/xmldom@0.8.3

Severity breakdown

CVSS 3.1 9.8

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.

How to prevent it
  • Implementation: By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
  • Architecture and Design: By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
  • Implementation: When handling untrusted objects, validating using a schema can be used.
  • Implementation: By using an object without prototypes (via Object.create(null) ), adding object prototype attributes by accessing the prototype via the special attributes becomes impossible, mitigating this weakness.
  • Implementation: Map can be used instead of objects in most cases. If Map methods are used instead of object attributes, it is not possible to access the object prototype or modify it.

References

Timeline

  1. Published
  2. Withdrawn
  3. Last updated by the source
  4. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-x4fp-j954-r2f4
xmldom: End-tag Whitespace-Trim Regex ReDoS — quadratic backtracking in the 0.8.x end-tag parser
High Also affects @xmldom/xmldom
GHSA-vr34-hp96-76pp
xmldom: requireWellFormed DocType publicId/systemId validation is bypassable via an embedded line terminator
High Also affects @xmldom/xmldom
GHSA-jxjr-3g7g-3944
xmldom: requireWellFormed element/attribute name validation is bypassable via an embedded line terminator
High Also affects @xmldom/xmldom
GHSA-c7q8-3ch8-vqpv
xmldom: Processing Instruction Target Injection Bypasses requireWellFormed
High Also affects xmldom
GHSA-965w-775f-mr7g
xmldom: Quadratic-memory consumption
High Also affects xmldom
GHSA-93r5-fhx6-vmg9
xmldom: Quadratic-time parsing via the malformed-input recovery path — `parseElementStartPart` re-scan and `normalize()` adjacent-text merge
High Also affects xmldom
GHSA-8344-3jmq-59r6
xmldom: Quadratic-time attribute deduplication
High Also affects xmldom
GHSA-6mj3-qw4j-hgrw
xmldom: HTML raw-text closing-tag case mismatch causes output amplification
High Also affects @xmldom/xmldom
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor