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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 4.45% (percentile 92, 2026-11-26)
- **CWE:** CWE-1321
- **Aliases:** GHSA-9c47-m6qq-7p4h
- **Published:** 2022-12-24T00:00:00.000Z
- **Modified:** 2026-09-10T03:49:56.250Z

## Who should check

- Projects that depend on npm package json5 (\>= 2.0.0, \< 2.2.2)
- Anyone running json5 \< 2.2.2

## 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.

## Affected and fixed versions

- npm `json5`: affected \>= 2.0.0, \< 2.2.2; fixed 2.2.2, 1.0.2 (osv)
- json5: \< 2.2.2 (cvelist)

## Mitigation

- Upgrade json5 to one of 2.2.2, 1.0.2 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-46175. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-46175.md
Affected: json5 >= 2.0.0, < 2.2.2
Fixed in: 2.2.2, 1.0.2

Steps:
1. Search this machine and project for json5 (npm), json5: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-46175 being exploited?

There is no confirmed exploitation: CVE-2022-46175 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 4.45% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-46175?

High: CVSS 7.1 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2022-46175?

json5 \>= 2.0.0, \< 2.2.2.

### Is there a fix for CVE-2022-46175?

Yes. Fixed in 2.2.2, 1.0.2. Upgrade json5 to one of 2.2.2, 1.0.2 (or later in the same release line).

### How do I check if I'm affected by CVE-2022-46175?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-46175>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-9c47-m6qq-7p4h> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2022-46175> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-46175>
