Appsecure logo

CVE-2022-46175: High Vulnerability in JSON5 Library

A high-severity vulnerability in the JSON5 library allows for prototype pollution, potentially leading to various security issues. Organizations using affected versions must prioritize remediation to avoid exploitation.

HIGHPublic ExploitCVSS 7.1 · Published December 24, 2022

Not a customer? See how AppSecure simulates real world attacks to protect your infrastructure.

Speak to Experts

CVE-2022-46175 is a high-severity vulnerability affecting the JSON5 library, which is designed to simplify the JSON data format. The vulnerability arises from the library's `parse` method allowing the parsing of keys named `__proto__` in versions prior to 1.0.2 and 2.2.2. This flaw permits attackers to manipulate the prototype of objects returned by `JSON5.parse`, potentially leading to significant security risks, including denial of service, cross-site scripting, elevation of privilege, and in severe cases, remote code execution.

The CVSS score for this vulnerability is 7.1, indicating high severity. Organizations utilizing affected versions should act swiftly to mitigate risks associated with this vulnerability. The potential impact on applications can be drastic, depending on how the returned object is utilized and how keys are filtered. Therefore, it is crucial for security teams to assess their exposure and apply necessary patches.

JSON5 versions 1.0.2, 2.2.2, and later include patches for this vulnerability. Organizations should prioritize patching immediately to avoid exploitation.

The exploitation status indicates high exploitability; however, no public exploits are confirmed at this time. As the vulnerability is actively discussed within the security community, monitoring for updates and applying patches is essential.

Vulnerability Details

The vulnerability allows for prototype pollution, specifically through the parsing of `__proto__` keys. The vulnerability has been assigned the CWE ID CWE-1321. It affects JSON5 versions before 1.0.2 and 2.2.2 and is categorized as high severity due to the implications it can have on security.

Technical Analysis

The root cause of the vulnerability lies in the JSON5 library's handling of the `parse` method. It does not restrict keys named `__proto__`, allowing attackers to introduce unexpected properties into the object returned by the method. This could lead to various security issues, including manipulation of object behavior in trusted operations.

The attack vector is network-based, with high complexity. It requires low privileges and does not necessitate user interaction. If an attacker successfully exploits this vulnerability, it can lead to high confidentiality and availability impacts, as well as a low integrity impact.

Risk & Impact Analysis

Risk to organizations includes potential denial of service, cross-site scripting, and elevation of privilege. The blast radius could be significant, especially for applications using the JSON5 library in trusted contexts. Organizations should assess their risk based on their deployment of the affected library versions and ensure they have a strategy for remediation.

Signal

Status

Known Exploit

Yes

Public PoC

Yes

Actively Exploited

No

Ransomware Use

No

Affected Versions

The affected versions of JSON5 are those before 1.0.2 and those between 2.0.0 and 2.2.1. The vulnerable Fedora version is 37. Organizations using these versions should upgrade to the latest patched versions to mitigate risks.

Mitigation & Remediation

Organizations should prioritize upgrading to JSON5 versions 1.0.2, 2.2.2, or later to mitigate this vulnerability. If an upgrade is not immediately feasible, consider switching to `JSON.parse` for parsing tasks as a temporary workaround. Additionally, implement input validation and sanitization to filter out unwanted keys, especially `__proto__`, from user input.

For further security measures, organizations can enhance their application security posture through penetration testing to identify similar vulnerabilities.

Detection Guidance

Organizations should monitor for anomalous behavior in applications utilizing the JSON5 library. Key indicators include unexpected changes to object prototypes, unusual application crashes, and reports of cross-site scripting attempts. Implementing network signatures that detect abnormal JSON5 usage patterns can also aid in early detection.

AppSecure Threat Intelligence Insight

This vulnerability highlights the need for stringent input validation in libraries handling JSON data. The trend of prototype pollution vulnerabilities is concerning as they can lead to severe security breaches. Security teams should focus on enhancing their validation processes and consider proactive measures like vulnerability management programs to ensure that similar weaknesses are identified and addressed swiftly.

The JSON5 vulnerability serves as a reminder of the importance of keeping libraries up to date. Regularly reviewing dependency versions and applying patches is critical to maintaining a secure software environment. Engaging in penetration testing can help organizations identify vulnerabilities before they are exploited.

By understanding the implications of such vulnerabilities and prioritizing security measures, organizations can better defend against potential attacks.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Latest CVEs. Recently published vulnerabilities from the NVD database.

View all vulnerabilities
CVE IDSeverity
CVE-2025-65418HIGH
CVE-2025-65417MEDIUM
CVE-2025-65416MEDIUM
CVE-2025-65415MEDIUM
CVE-2025-61314HIGH

Protect Your Business with Hacker-Focused Approach.