Xmldom: Improperly Controlled Modification of Object Prototype Attributes
CVE-2022-37616 is a critical-severity improperly controlled modification of object prototype attributes vulnerability in Xmldom from Xmldom Project, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 0.7.6, 0.8.3 as the first without the flaw, so updating Xmldom to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 2.13% chance of exploitation within 30 days, higher than 82% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update Xmldom to 0.7.6 or 0.8.3, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Xmldom Project | Xmldom | 0.6.0 and earlier; 0.7.0 up to, but not including, 0.7.6; 0.8.0 up to, but not including, 0.8.3; 0.9.0 | 0.7.6, 0.8.3 |
| Debian | Debian Linux | 10.0 | Not stated |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
Official description
A prototype pollution vulnerability exists in the function copy in dom.js in the xmldom (published as @xmldom/xmldom) package before 0.8.3 for Node.js via the p variable. NOTE: the vendor states "we are in the process of marking this report as invalid"; however, some third parties takes the position that "A prototype injection/Prototype pollution is not just when global objects are polluted with recursive merge or deep cloning but also when a target object is polluted."
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improperly Controlled Modification of Object Prototype Attributes
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 developers prevent this class of flaw
- By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- When handling untrusted objects, validating using a schema can be used.
More Improperly Controlled Modification of Object Prototype Attributes vulnerabilities (CWE-1321)
Timeline
- CVE record published.
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/xmldom/xmldom/security/advisories/GHSA-9pgh-qqpf-7wqjThird Party Advisory
Patches and release notes
- github.com/xmldom/xmldom/blob/bc36efddf9948aba15618f85dc1addfc2ac9d7b2/lib/dom.js#L1Third Party Advisory
- github.com/xmldom/xmldom/blob/bc36efddf9948aba15618f85dc1addfc2ac9d7b2/lib/dom.js#L3Third Party Advisory
- github.com/xmldom/xmldom/issues/436Issue Tracking, Third Party Advisory
Third-party and government advisories
- users.encs.concordia.ca/~mmannan/publications/JS-vulnerability-aisaccs2022.pdfTechnical Description, Third Party Advisory
- dl.acm.org/doi/abs/10.1145/3488932.3497769Technical Description, Third Party Advisory
- dl.acm.org/doi/pdf/10.1145/3488932.3497769Third Party Advisory
- github.com/xmldom/xmldom/issues/436#issuecomment-1319412826Issue Tracking, Third Party Advisory
- github.com/xmldom/xmldom/issues/436#issuecomment-1327776560Issue Tracking, Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/10/msg00023.htmlMailing List, Third Party Advisory
Recent Improperly Controlled Modification of Object Prototype Attributes vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 8.0 High severity
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
Spotted an error? Tell us.