
CVE catalog
CVE-2022-46175
node-json5: CVE-2022-46175
- Severity
- High · CVSS 8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 9.70% · Oct 25, 2026
JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e.g. for config files). The `parse` method of the JSON5 library before and including versions 1.0.1 and 2.2.1 does not restrict parsing of keys named `__proto__`, allowing specially crafted strings to pollute the prototype of the resulting object. This vulnerability pollutes the prototype of the object returned by `JSON5.parse` and not the global Object prototype, which is the commonly understood definition of Prototype Pollution. However, polluting the prototype of a single object can have significant security impact for an application if the object is later used in trusted operations. This vulnerability could allow an attacker to set arbitrary and unexpected keys on the object returned from `JSON5.parse`. The actual impact will depend on how applications utilize the returned object and how they filter unwanted keys, but could include denial of service, cross-site scripting, elevation of privilege, and in extreme cases, remote code execution. `JSON5.parse` should restrict parsing of `__proto__` keys when parsing JSON strings to objects. As a point of reference, the `JSON.parse` method included in JavaScript ignores `__proto__` keys. Simply changing `JSON5.parse` to `JSON.parse` in the examples above mitigates this vulnerability. This vulnerability is patched in json5 versions 1.0.2, 2.2.2, and later.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | node-json5 | sid | 2.2.3+dfsg-8 | fixed |
| Debian | node-json5 | forky | 2.2.3+dfsg-8 | fixed |
| Debian | node-json5 | trixie | 2.2.3+dfsg-1 | fixed |
| Debian | node-json5 | bookworm | 2.2.3+dfsg-1 | fixed |
| Npm | json5 | Not reported | 1.0.2 | fixed |
| Npm | json5 | Not reported | 1.0.2 | fixed |
| Ubuntu | node-json5 | pro | 2.1.3-2 | vulnerable |
| Ubuntu | node-json5 | pro | 2.1.3-3 | vulnerable |
| Ubuntu | node-json5 | pro | 2.2.0+dfsg-1 | vulnerable |
| Ubuntu | node-json5 | pro | 2.2.0+dfsg-1ubuntu0.1~esm1 | fixed |
| Ubuntu | node-json5 | 20.04 | 0.5.1-1 | vulnerable |
| Ubuntu | node-json5 | 20.04 | 0.5.1-3 | vulnerable |
| Ubuntu | node-json5 | 20.04 | 0.5.1-3ubuntu0.1 | fixed |
| Ubuntu | node-json5 | pro | 2.1.3-2 | vulnerable |
| Ubuntu | node-json5 | pro | 2.1.3-3 | vulnerable |
| Ubuntu | node-json5 | pro | 2.2.0+dfsg-1 | vulnerable |
| Ubuntu | node-json5 | pro | 2.2.0+dfsg-1ubuntu0.1~esm1 | fixed |
| Ubuntu | node-json5 | 20.04 | 0.5.1-1 | vulnerable |
| Ubuntu | node-json5 | 20.04 | 0.5.1-3 | vulnerable |
| Ubuntu | node-json5 | 20.04 | 0.5.1-3ubuntu0.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | node-json5 | source | sid | 2.2.3+dfsg-1 | not yet assigned | Not reported | [1027145] |
| Debian | node-json5 | source | forky | 2.2.3+dfsg-1 | not yet assigned | Not reported | [1027145] |
| Debian | node-json5 | source | trixie | 2.2.3+dfsg-1 | not yet assigned | Not reported | [1027145] |
| Debian | node-json5 | source | bookworm | 2.2.3+dfsg-1 | not yet assigned | Not reported | [1027145] |
| Npm | json5 | npm | Not reported | 1.0.2 | Not reported | GHSA-9C47-M6QQ-7P4H | Not reported |
| Npm | json5 | npm | Not reported | 1.0.2 | Not reported | Not reported | Not reported |
| Ubuntu | node-json5 | deb | pro | 2.2.0+dfsg-1ubuntu0.1~esm1 | Not reported | USN-6758-1 | Not reported |
| Ubuntu | node-json5 | deb | 20.04 | 0.5.1-3ubuntu0.1 | Not reported | USN-6758-1 | Not reported |
| Ubuntu | node-json5 | deb | pro | 2.2.0+dfsg-1ubuntu0.1~esm1 | Not reported | UBUNTU-CVE-2022-46175 | Not reported |
| Ubuntu | node-json5 | deb | 20.04 | 0.5.1-3ubuntu0.1 | Not reported | UBUNTU-CVE-2022-46175 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [node-json5]Fixed
Details (2)
2.2.3+dfsg-1· all · bookwormFixed · Fixed:
2.2.3+dfsg-1dsa · node-json5 · debian · bookworm
2.2.3+dfsg-1· all · bookwormFixed · Fixed:
2.2.3+dfsg-1dsa · node-json5 · debian · bookworm
Observed:
References
- [https://osv.dev/vulnerability/DLA-3665-1]
- [https://osv.dev/vulnerability/GHSA-9c47-m6qq-7p4h]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2022-46175]
- [https://osv.dev/vulnerability/USN-6758-1]
- [https://security-tracker.debian.org/tracker/CVE-2022-46175]
- [https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-46175.json]
- [https://wid.cert-bund.de/.well-known/csaf/white/2023/wid-sec-w-2023-1350.json]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX]