Prototype pollution in json5
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Partial Red Hat: 11 fixed, 28 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| json5 | json5 | before 2.2.2 | 2.2.2 | Patch available | CNA |
| — | json5 (npm) | 2.0.0 to before 2.2.2 | 2.2.2 | Patch available | GHSA-9c47-m6qq-7p4h |
| — | json5 (npm) | before 1.0.2 | 1.0.2 | Patch available | GHSA-9c47-m6qq-7p4h |
- json5 Vendorjson5 Affected before 2.2.2 Fixed in 2.2.2 Patch available CNA
- json5 (npm) Vendor— Affected 2.0.0 to before 2.2.2 Fixed in 2.2.2 Patch available GHSA-9c47-m6qq-7p4h
- json5 (npm) Vendor— Affected before 1.0.2 Fixed in 1.0.2 Patch available GHSA-9c47-m6qq-7p4h
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:json5:json5:*:*:*:*:*:node.js:*:* | before 1.0.2; 2.0.0 to before 2.2.2 | Vulnerable | json5 |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
- cpe:2.3:a:json5:json5:*:*:*:*:*:node.js:*:* Versions before 1.0.2; 2.0.0 to before 2.2.2 Vulnerable ·json5
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
Remediation
- Fix · CNA json5 (json5) Fixed in 2.2.2
- Fix · GHSA-9c47-m6qq-7p4h json5 (npm) Fixed in 2.2.2 Advisory →
- Fix · GHSA-9c47-m6qq-7p4h json5 (npm) Fixed in 1.0.2 Advisory →
Red Hat 11 advisories
- RHSA-2025:19094 Released 2025-10-23 · Red Hat rating ImportantRed Hat OpenShift Dev Spaces 3.24.0 Release.
- Red Hat OpenShift Dev Spaces (RHOSDS) 3.24 registry.redhat.io/devspaces/code-rhel9, registry.redhat.io/devspaces/dashboard-rhel9, registry.redhat.io/devspaces/openvsx-rhel9 +4
- RHSA-2024:4631 Released 2024-07-18 · Red Hat rating ImportantRed Hat OpenShift Dev Spaces 3.15.0 release
- Red Hat OpenShift Dev Spaces 3 devspaces/configbump-rhel8, devspaces/dashboard-rhel8, devspaces/devspaces-rhel8-operator +4
- RHSA-2023:3742 Released 2023-06-21 · Red Hat rating ImportantRed Hat OpenShift Data Foundation 4.13.0 security and bug fix update
- RHODF 4.13 for RHEL 9 odf4/cephcsi-rhel9, odf4/mcg-core-rhel9, odf4/mcg-rhel9-operator +7
Show 8 more Red Hat advisories
- RHSA-2023:1428 Released 2023-03-23 · Red Hat rating ImportantMigration Toolkit for Containers (MTC) 1.7.8 security and bug fix update
- 8Base-RHMTC-1.7 rhmtc/openshift-migration-controller-rhel8, rhmtc/openshift-migration-ui-rhel8
- RHSA-2023:1043 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 7
- Red Hat Single Sign-On 7.6 for RHEL 7 Server rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el7sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el7sso
- RHSA-2023:1049 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update
- Red Hat Single Sign-On 7
- RHSA-2023:1047 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 for OpenShift image security and enhancement update
- Middleware Containers for OpenShift rh-sso-7/sso76-openshift-rhel8
- RHSA-2023:1045 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 9
- Red Hat Single Sign-On 7.6 for RHEL 9 rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el9sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el9sso
- RHSA-2023:1044 Released 2023-03-01 · Red Hat rating ImportantRed Hat Single Sign-On 7.6.2 security update on RHEL 8
- Red Hat Single Sign-On 7.6 for RHEL 8 rh-sso7-keycloak-18.0.6-1.redhat_00001.1.el8sso, rh-sso7-keycloak-server-18.0.6-1.redhat_00001.1.el8sso
- RHSA-2023:0934 Released 2023-02-28 · Red Hat rating ImportantMigration Toolkit for Applications security and bug fix update
- MTA 6.0 for RHEL 8 mta/mta-admin-addon-rhel8, mta/mta-hub-rhel8, mta/mta-ui-rhel8 +1
- RHSA-2023:0634 Released 2023-02-09 · Red Hat rating ModerateRed Hat OpenShift (Logging Subsystem) security update
- RHOL 5.6 for RHEL 8 openshift-logging/logging-view-plugin-rhel8
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Migration Toolkit for Virtualization | Affected | No fix yet: Fix deferred |
| OpenShift Pipelines | Affected | No fix yet |
| OpenShift Service Mesh 2 | Affected | No fix planned: Will not fix |
| OpenShift Service Mesh 2.1 | Affected | No fix planned: Will not fix |
| Red Hat A-MQ Online | Affected | No fix planned: Out of support scope |
| Red Hat Advanced Cluster Management for Kubernetes 2 | Affected | No fix planned: Will not fix |
| Red Hat Advanced Cluster Security 3 | Affected | No fix yet |
| Red Hat Ansible Automation Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Decision Manager 7 | Affected | No fix planned: Out of support scope |
| Red Hat Discovery 1 | Affected | No fix yet |
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux 9 | Affected | No fix planned: Will not fix |
| Red Hat Fuse 7 | Affected | No fix planned: Out of support scope |
| Red Hat Integration Camel K 1 | Affected | No fix yet: Fix deferred |
| Red Hat Integration Camel Quarkus 1 | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Container Platform 3.11 | Affected | No fix planned: Out of support scope |
| Red Hat OpenShift Container Platform 4 | Affected | No fix planned: Will not fix |
| Red Hat OpenShift Dev Spaces | Affected | No fix planned: Will not fix |
| Red Hat OpenShift GitOps | Affected | No fix yet |
| Red Hat OpenShift Virtualization 4 | Affected | No fix yet |
| Red Hat OpenShift distributed tracing 2 | Affected | No fix yet |
| Red Hat Openshift Container Storage 4 | Affected | No fix planned: Out of support scope |
| Red Hat Openshift Data Foundation 4 | Affected | No fix planned: Will not fix |
| Red Hat Process Automation 7 | Affected | No fix planned: Out of support scope |
| Red Hat Quay 3 | Affected | No fix planned: Will not fix |
| Red Hat build of Apache Camel for Spring Boot 3 | Affected | No fix yet: Fix deferred |
| 8Base-RHMTC-1.7 | Fixed | RHSA-2023:1428 |
| MTA 6.0 for RHEL 8 | Fixed | RHSA-2023:0934 |
| Middleware Containers for OpenShift | Fixed | RHSA-2023:1047 |
| RHODF 4.13 for RHEL 9 | Fixed | RHSA-2023:3742 |
| RHOL 5.6 for RHEL 8 | Fixed | RHSA-2023:0634 |
| Red Hat OpenShift Dev Spaces (RHOSDS) 3.24 | Fixed | RHSA-2025:19094 |
| Red Hat OpenShift Dev Spaces 3 | Fixed | RHSA-2024:4631 |
| Red Hat Single Sign-On 7 | Fixed | RHSA-2023:1049 |
| Red Hat Single Sign-On 7.6 for RHEL 7 Server | Fixed | RHSA-2023:1043 |
| Red Hat Single Sign-On 7.6 for RHEL 8 | Fixed | RHSA-2023:1044 |
| Red Hat Single Sign-On 7.6 for RHEL 9 | Fixed | RHSA-2023:1045 |
Not affected: 16 products
- 8Base-RHMTC-1.7
- MTA 6.0 for RHEL 8
- OpenShift Developer Tools and Services
- RHODF 4.13 for RHEL 9
- RHOL 5.6 for RHEL 8
- Red Hat Advanced Cluster Management for Kubernetes 2
- Red Hat Data Grid 8
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat JBoss Data Grid 7
- Red Hat JBoss Enterprise Application Platform 6
- Red Hat JBoss Enterprise Application Platform 7
- Red Hat JBoss Enterprise Application Platform Expansion Pack
- Red Hat OpenShift Dev Spaces (RHOSDS) 3.24
- Red Hat OpenShift Dev Spaces 3
- Red Hat Satellite 6
Timeline
- 2026-10-02 Threatist record created from CVE-2022-46175
- 2026-10-03 Alias added: GHSA-9c47-m6qq-7p4h
References
Advisory 3
Other 5
- [debian-lts-announce] 20231125 [SECURITY] [DLA 3665-1] node-json5 security update
- https://github.com/json5/json5/commit/62a65408408d40aeea14c7869ed327acead12972
- https://github.com/json5/json5/commit/7774c1097993bc3ce9f0ac4b722a32bf7d6871c8
- https://github.com/json5/json5
- https://lists.fedoraproject.org/archives/list/[email protected]/message/3S26TLPLVFAJTUN3VIXFDEBEXDYO22CE
Sources
- CVE-2022-46175 · CVE Program
- CVE-2022-46175 · NVD
- FIRST EPSS
- GHSA-9c47-m6qq-7p4h · GitHub Advisory Database · CC BY 4.0
- CVE-2022-46175 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences