Loader-utils: Improperly Controlled Modification of Object Prototype Attributes
CVE-2022-37601 is a critical-severity improperly controlled modification of object prototype attributes vulnerability in Loader-utils from Webpack.js, 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 1.4.1, 2.0.3 as the first without the flaw, so updating Loader-utils to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 3.5% chance of exploitation within 30 days, higher than 89% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update Loader-utils to 1.4.1 or 2.0.3, whichever matches your release line, or a later version.
- 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 |
|---|---|---|---|
| Webpack.js | Loader-utils | before 1.4.1; 2.0.0 up to, but not including, 2.0.3 | 1.4.1, 2.0.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
Prototype pollution vulnerability in function parseQuery in parseQuery.js in webpack loader-utils via the name variable in parseQuery.js. This affects all versions prior to 1.4.1 and 2.0.3.
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.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- github.com/webpack/loader-utils/issues/212Issue Tracking, Third Party Advisory
- lists.debian.org/debian-lts-announce/2022/12/msg00044.htmlThird Party Advisory
Technical write-ups (may include proof of concept)
- github.com/webpack/loader-utils/issues/212#issuecomment-1319192884Exploit, Issue Tracking, Third Party Advisory
- github.com/xmldom/xmldom/issues/436#issuecomment-1319412826Exploit, Issue Tracking, Third Party Advisory
Other references
- users.encs.concordia.ca/~mmannan/publications/JS-vulnerability-aisaccs2022.pdfTechnical Description
- dl.acm.org/doi/abs/10.1145/3488932.3497769Technical Description
- dl.acm.org/doi/pdf/10.1145/3488932.3497769Technical Description
- github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/parseQuery.js#L11Product
- github.com/webpack/loader-utils/blob/d9f4e23cf411d8556f8bac2d3bf05a6e0103b568/lib/parseQuery.js#L47Product
Other vulnerabilities in Loader-utils
- 7.5 High severity
- 7.5 High severity
Recent Improperly Controlled Modification of Object Prototype Attributes vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 8.0 High severity
- 9.8 Critical severity
Spotted an error? Tell us.