CVE-2022-46175
CVE-2022-46175
CVSS 7.1 · High · EPSS 9.7% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- json5No fix published
- node-json5 Debian 12Update to 2.2.3+dfsg-1
- node-json5 Debian 13Update to 2.2.3+dfsg-1
- node-json5 Debian 14Update to 2.2.3+dfsg-1
- and 4 more
Check the installed version:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="node-json5"'Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Fixes in distributions
- RHSA-2023:1043 · Red Hat red hat single sign on 7.6 el7 ·
- RHSA-2023:1044 · Red Hat red hat single sign on 7.6 el8 ·
- RHSA-2023:1045 · Red Hat red hat single sign on 7.6 el9 ·
- USN-6758-1 · Ubuntu 20.04 LTS, Ubuntu Pro 18.04 LTS, Ubuntu Pro 22.04 LTS ·
- DLA-3665-1 · Debian 10 ·
Affected products and versions
json5
- Versions
- < 2.2.2: Affected
No fix published
node-json5 Debian 12
- Affected ranges
- ECOSYSTEM: < 2.2.3+dfsg-1
Update to 2.2.3+dfsg-1
node-json5 Debian 13
- Affected ranges
- ECOSYSTEM: < 2.2.3+dfsg-1
Update to 2.2.3+dfsg-1
node-json5 Debian 14
- Affected ranges
- ECOSYSTEM: < 2.2.3+dfsg-1
Update to 2.2.3+dfsg-1
json5 npm
- Affected ranges
- SEMVER: ≥ 2.0.0, < 2.2.2
Update to 2.2.2
json5 npm
- Affected ranges
- SEMVER: < 1.0.2
Update to 1.0.2
node-json5 Ubuntu Pro 18.04 LTS
- Versions
- 0.5.0-1
- 0.5.1-1
- Affected ranges
- ECOSYSTEM: < 0.5.1-1ubuntu0.1~esm1
Update to 0.5.1-1ubuntu0.1~esm1
node-json5 Ubuntu 20.04 LTS
- Versions
- 0.5.1-1
- 0.5.1-3
- Affected ranges
- ECOSYSTEM: < 0.5.1-3ubuntu0.1
Update to 0.5.1-3ubuntu0.1
node-json5 Ubuntu Pro 22.04 LTS
- Versions
- 2.1.3-2
- 2.1.3-3
- 2.2.0+dfsg-1
- Affected ranges
- ECOSYSTEM: < 2.2.0+dfsg-1ubuntu0.1~esm1
Update to 2.2.0+dfsg-1ubuntu0.1~esm1
Original sources
- https://github.com/json5/json5/security/advisories/GHSA-9c47-m6qq-7p4h
- https://github.com/json5/json5/issues/199
- https://github.com/json5/json5/issues/295
- https://github.com/json5/json5/pull/298
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE/
- https://lists.debian.org/debian-lts-announce/2023/11/msg00021.html
- https://nvd.nist.gov/vuln/detail/CVE-2022-46175