CVE-2022-37616: Withdrawn Improperly Controlled Modification Of Object Vulnerability
CRITICALCVE-2022-37616 is a CRITICAL (CVSS 9.8) improperly controlled modification of object vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Withdrawn libraries in the npm ecosystem. The issue involves improperly controlled modification of object prototype attributes ('prototype pollution') in @xmldom/xmldom and xmldom. Remediation is available by upgrading affected packages to version 0.8.3, 0.9.0-beta.2, 0.7.6.
CVE-2022-37616 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2022-37616
To remediate this vulnerability, upgrade all affected Withdrawn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @xmldom/xmldom@0.8.3
npm install xmldom@Latest secure release
npm install @xmldom/xmldom@0.9.0-beta.2
npm install @xmldom/xmldom@0.7.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @xmldom/xmldom
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2022-37616, inspect your project dependencies using npm:
npm ls @xmldom/xmldom
Analyze the terminal output to locate any version of Withdrawn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.3), your application is affected.
Note: The npm ls @xmldom/xmldom command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where 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. In Withdrawn, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-37616 Affected Withdrawn Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@xmldom/xmldom
|
npm |
≥ 0.8.0
< 0.8.3
|
0.8.3
|
|
xmldom
|
npm |
≤ 0.6.0
|
|
|
@xmldom/xmldom
|
npm |
≥ 0.9.0-beta.1
< 0.9.0-beta.2
All 1 versions
0.9.0-beta.1
|
0.9.0-beta.2
|
|
@xmldom/xmldom
|
npm |
< 0.7.6
|
0.7.6
|
References
Frequently Asked Questions
What is CVE-2022-37616?
Which Withdrawn versions are affected?
What version fixes CVE-2022-37616?
Is @xmldom/xmldom affected?
Is xmldom affected?
What is the CVSS score of CVE-2022-37616?
What CWE is associated with CVE-2022-37616?
How can I check npm dependencies for CVE-2022-37616?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9pgh-qqpf-7wqj",
"modified" : "2022-11-08T19:35:06Z",
"published" : "2022-10-11T20:42:57Z",
"withdrawn" : "2022-11-08T19:35:06Z",
"aliases" : [ "CVE-2022-37616" ],
"summary" : "Withdrawn: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in @xmldom/xmldom and xmldom",
"details" : "## Withdrawn\n\nThis 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.\n\n## Original Description\n\n### Impact\nA prototype pollution vulnerability exists in the function copy in dom.js in the xmldom (published as @xmldom/xmldom) package.\n\n### Patches\nUpdate 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`).\n\n### Workarounds\nNone\n\n### References\nhttps://github.com/xmldom/xmldom/pull/437\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Email us at security@xmldom.org\n* Add information to https://github.com/xmldom/xmldom/issues/436\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@xmldom/xmldom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"fixed" : "0.8.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "xmldom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "0.6.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@xmldom/xmldom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.9.0-beta.1"
}, {
"fixed" : "0.9.0-beta.2"
} ]
} ],
"versions" : [ "0.9.0-beta.1" ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@xmldom/xmldom"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/security/advisories/GHSA-9pgh-qqpf-7wqj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-37616"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/issues/436"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/issues/436#issuecomment-1319412826"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/issues/436#issuecomment-1327776560"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/pull/437"
}, {
"type" : "WEB",
"url" : "https://dl.acm.org/doi/abs/10.1145/3488932.3497769"
}, {
"type" : "WEB",
"url" : "https://dl.acm.org/doi/pdf/10.1145/3488932.3497769"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/xmldom/xmldom"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/blob/bc36efddf9948aba15618f85dc1addfc2ac9d7b2/lib/dom.js#L1"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/blob/bc36efddf9948aba15618f85dc1addfc2ac9d7b2/lib/dom.js#L3"
}, {
"type" : "WEB",
"url" : "https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md#076"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2022/10/msg00023.html"
}, {
"type" : "WEB",
"url" : "http://users.encs.concordia.ca/~mmannan/publications/JS-vulnerability-aisaccs2022.pdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-10-11T20:42:57Z",
"nvd_published_at" : "2022-10-11T05:15:00Z"
}
}