# CVE-2022-46175: Prototype Pollution in JSON5 via Parse Method

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 9.74%, higher than 95% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-12-24T00:00:00.000Z
- Modified: 2026-09-10T03:49:56.250Z
- Also known as: GHSA-9c47-m6qq-7p4h
- Weaknesses: CWE-1321
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- json5 json5: < 2.2.2; before 1.0.2; from 2.0.0 before 2.2.2
- json5 (npm): from 2.0.0 before 2.2.2; before 1.0.2
- fedoraproject fedora: 37

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/json5/json5/security/advisories/GHSA-9c47-m6qq-7p4h> (exploit, third-party-advisory, web)
- <https://github.com/json5/json5/issues/199> (issue-tracking, patch, third-party-advisory, web)
- <https://github.com/json5/json5/issues/295> (issue-tracking, third-party-advisory, web)
- <https://github.com/json5/json5/pull/298> (patch, third-party-advisory, web)
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE/> (vendor-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/11/msg00021.html> (mailing-list, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-46175> (advisory)
- <https://github.com/json5/json5/commit/62a65408408d40aeea14c7869ed327acead12972> (web)
- <https://github.com/json5/json5/commit/7774c1097993bc3ce9f0ac4b722a32bf7d6871c8> (web)
- <https://github.com/json5/json5> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE> (web)

## Sources

- CVE List: [CVE-2022-46175](https://www.cve.org/CVERecord?id=CVE-2022-46175), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-9c47-m6qq-7p4h](https://github.com/advisories/GHSA-9c47-m6qq-7p4h), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2022-46175](https://nvd.nist.gov/vuln/detail/CVE-2022-46175), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-46175 · Whole record: https://cve.day/CVE-2022-46175.json · Rebuilt by cve.day 2026-11-25T22:58:17.856Z
