Skip to main content

CVE-2023-53154: CWE-125 Out-of-bounds Read in cJSON project cJSON

Low
VulnerabilityCVE-2023-53154cvecve-2023-53154cwe-125
Published: Fri May 23 2025 (05/23/2025, 00:00:00 UTC)
Source: CVE
Vendor/Project: cJSON project
Product: cJSON

Description

parse_string in cJSON before 1.7.18 has a heap-based buffer over-read via {"1":1, with no trailing newline if cJSON_ParseWithLength is called.

AI-Powered Analysis

AILast updated: 07/08/2025, 22:26:54 UTC

Technical Analysis

CVE-2023-53154 is a vulnerability identified in the cJSON project, specifically affecting versions prior to 1.7.18. The issue is classified as a CWE-125: Out-of-bounds Read, which occurs in the parse_string function when processing JSON input. The vulnerability arises when cJSON_ParseWithLength is called with a JSON string such as {"1":1, that lacks a trailing newline. Under these conditions, a heap-based buffer over-read can occur, meaning the parser reads beyond the allocated memory buffer. This can lead to undefined behavior including potential application crashes or information leakage. The vulnerability has a CVSS v3.1 base score of 2.9, indicating a low severity level. The vector details specify that the attack requires local access (AV:L), high attack complexity (AC:H), no privileges (PR:N), no user interaction (UI:N), and impacts only availability (A:L) without affecting confidentiality or integrity. No known exploits are currently reported in the wild, and no patches are linked yet. The vulnerability primarily affects software that uses cJSON for JSON parsing and that calls cJSON_ParseWithLength with specially crafted input lacking a trailing newline, which may be uncommon in typical usage scenarios.

Potential Impact

For European organizations, the impact of CVE-2023-53154 is generally limited due to its low severity and the requirement for local access and high attack complexity. However, organizations that embed cJSON in their software products or internal tools—especially those processing JSON data from local sources—could experience application instability or crashes if exposed to malformed JSON inputs exploiting this vulnerability. This could lead to denial of service conditions affecting availability of critical services. Since the vulnerability does not compromise confidentiality or integrity, the risk of data breaches or unauthorized data modification is minimal. Nevertheless, in environments where high availability is critical, such as financial services or healthcare sectors prevalent in Europe, even low-severity availability issues can have operational impacts. Additionally, software vendors and developers in Europe using cJSON should be aware of this vulnerability to prevent indirect exposure through their products.

Mitigation Recommendations

To mitigate CVE-2023-53154, European organizations and developers should: 1) Upgrade to cJSON version 1.7.18 or later once it is released, as it is expected to contain the fix for this vulnerability. 2) In the interim, implement input validation and sanitization to ensure JSON strings passed to cJSON_ParseWithLength always include proper termination such as trailing newlines, preventing the triggering of the out-of-bounds read. 3) Restrict local access to systems running vulnerable software to trusted users only, minimizing the risk of exploitation. 4) Employ runtime protections such as memory safety tools (e.g., AddressSanitizer) during development and testing to detect and prevent buffer over-read conditions. 5) Monitor application logs for crashes or anomalies related to JSON parsing that could indicate attempted exploitation. 6) For software vendors, conduct thorough code reviews and fuzz testing on JSON parsing components to identify and remediate similar issues proactively.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
mitre
Date Reserved
2025-05-23T00:00:00.000Z
Cisa Enriched
false
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6830962c0acd01a249273faf

Added to database: 5/23/2025, 3:37:16 PM

Last enriched: 7/8/2025, 10:26:54 PM

Last updated: 8/18/2025, 11:28:31 PM

Views: 28

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats