CVE-2022-46175
published 2022-12-24CVE-2022-46175: 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…
PriorityP357high8.8CVSS 3.1
AVNACLPRLUINSUCHIHAH
EPSS
9.30%
94.8th percentile
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.
Affected
11 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | node-json5 | < node-json5 2.2.3+dfsg-1 (bookworm) | node-json5 2.2.3+dfsg-1 (bookworm) |
| fedoraproject | fedora | — | — |
| json5 | json5 | < 2.2.2 | 2.2.2 |
| json5 | json5 | < 1.0.2 | 1.0.2 |
| json5 | json5 | >= 0 < 1.0.2 | 1.0.2 |
| json5 | json5 | >= 2.0.0 < 2.2.2 | 2.2.2 |
| json5 | json5 | >= 2.0.0 < 2.2.2 | 2.2.2 |
| msrc | azl3_python-tensorboard_2.11.0-3_on_azure_linux_3.0 | — | — |
| msrc | azl3_python-tensorboard_2.16.2-2_on_azure_linux_3.0 | — | — |
| msrc | azure_linux_3.0_arm | — | — |
| msrc | azure_linux_3.0_x64 | — | — |
Detection & IOCsextracted from sources · hover to see the quote
- →Detect prototype pollution attempts via JSON5.parse by monitoring for input strings containing `__proto__` keys in JSON5-parsed data ↗
- →Flag or block any JSON5 input payloads containing the literal key `__proto__` being passed to JSON5.parse, as this is the specific attack vector for prototype pollution ↗
- →Identify vulnerable json5 library versions 1.0.1 and below, or 2.2.1 and below in application dependency manifests (package.json, package-lock.json, yarn.lock); patched versions are 1.0.2 and 2.2.2 ↗
- ·This vulnerability pollutes the prototype of the specific object returned by JSON5.parse, NOT the global Object prototype — impact is scoped to how the returned object is subsequently used in the application ↗
- ·The json5 package is a build-time dependency in Red Hat products and is not used in production runtime, reducing exploitability in those environments ↗
CVSS provenance
nvdv3.18.8HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
osv8.8HIGH
vendor_debian7.1HIGH
vendor_msrc7.1HIGH
vendor_redhat7.1HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
Prototype Pollution in JSON5 via Parse Method
osv·2022-12-29
CVE-2022-46175 [HIGH] Prototype Pollution in JSON5 via Parse Method
Prototype Pollution in JSON5 via Parse Method
The `parse` method of the JSON5 library before and including version `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.
## Impact
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
GHSA
Prototype Pollution in JSON5 via Parse Method
ghsa·2022-12-29
CVE-2022-46175 [HIGH] CWE-1321 Prototype Pollution in JSON5 via Parse Method
Prototype Pollution in JSON5 via Parse Method
The `parse` method of the JSON5 library before and including version `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.
## Impact
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
OSV
CVE-2022-46175: JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e
osv·2022-12-24·CVSS 8.8
CVE-2022-46175 [HIGH] CVE-2022-46175: JSON5 is an extension to the popular JSON file format that aims to be easier to write and maintain by hand (e
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 retu
Ubuntu
JSON5 vulnerability
vendor_ubuntu·2024-04-30
CVE-2022-46175 JSON5 vulnerability
Title: JSON5 vulnerability
Summary: JSON5 could allow unintended access to network services or have other
unspecified impact.
It was discovered that the JSON5 parse method incorrectly handled the parsing
of keys named \_\_proto\_\_. An attacker could possibly use this issue to pollute
the prototype of the returned object, setting arbitrary or unexpected keys, and
cause a denial of service, allow unintended access to network services or have
other unspecified impact, depending on the application's use of the module.
Instructions: After a standard system update you may need to restart any services that use
the library to make all the necessary changes.
Red Hat
json5: Prototype Pollution in JSON5 via Parse Method
vendor_redhat·2022-12-24·CVSS 7.1
CVE-2022-46175 [HIGH] CWE-1321 json5: Prototype Pollution in JSON5 via Parse Method
json5: Prototype Pollution in JSON5 via Parse Method
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 t
Microsoft
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 version
vendor_msrc·2022-12-13·CVSS 7.1
CVE-2022-46175 [HIGH] CWE-1321 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 version
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 returne
Debian
CVE-2022-46175: node-json5 - JSON5 is an extension to the popular JSON file format that aims to be easier to ...
vendor_debian·2022·CVSS 7.1
CVE-2022-46175 [HIGH] CVE-2022-46175: node-json5 - JSON5 is an extension to the popular JSON file format that aims to be easier to ...
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 retu
No detection rules found.
No public exploits indexed.
https://github.com/json5/json5/issues/199https://github.com/json5/json5/issues/295https://github.com/json5/json5/pull/298https://github.com/json5/json5/security/advisories/GHSA-9c47-m6qq-7p4hhttps://lists.debian.org/debian-lts-announce/2023/11/msg00021.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE/https://github.com/json5/json5/issues/199https://github.com/json5/json5/issues/295https://github.com/json5/json5/pull/298https://github.com/json5/json5/security/advisories/GHSA-9c47-m6qq-7p4hhttps://lists.debian.org/debian-lts-announce/2023/11/msg00021.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE/
2022-12-24
Published