CjsonApplication · Davegamble

CVE-2025-57052

CRITICAL · 9.8 CVSS v3.1 Published 2025-09-03
Fix available
A fix is available. Upgrade to after 1.7.18 or later.
See remediation →
100/100
Remediation priority · Urgent
Public exploit Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
cJSON 1.5.0 through 1.7.18 allows out-of-bounds access via the decode_array_index_from_pointer function in cJSON_Utils.c, allowing remote attackers to bypass array bounds checking and access restricted data via malformed JSON pointer strings containing alphanumeric characters.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The cJSON library versions 1.5.0 through 1.7.18 contain an out-of-bounds access vulnerability in the decode_array_index_from_pointer function in cJSON_Utils.c. Attackers can bypass array bounds checking by providing malformed JSON pointer strings containing alphanumeric characters, allowing access to restricted memory.

MitigationUpgrade cJSON to a version beyond 1.7.18 where the vulnerability is patched, or implement strict input validation on JSON pointer strings before processing to reject malformed pointers.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
CjsonApplication
Affected:>= 1.5.0, <= 1.7.18

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if cJSON library is present
    Search your codebase, dependencies, or installed packages for files named cJSON.c, cJSON.h, or cJSON_Utils.c. On Linux systems, run: find / -name "cJSON*" 2>/dev/null
    Affected if cJSON source files or library binaries are found in the environment
  2. Determine the installed cJSON version
    Check the version in the cJSON header file (cJSON.h) or the version tag in the source repository. Look for a version constant like cJSON_VERSION or check git tags if the source is available
    Affected if The version number is >= 1.5.0 and <= 1.7.18
  3. Verify cJSON_Utils.c is compiled or linked
    Inspect your build artifacts, object files, or linked libraries for the decode_array_index_from_pointer function. Search compiled binaries using: nm your_binary | grep decode_array_index_from_pointer
    Affected if The cJSON_Utils.c file is compiled into the application or the decode_array_index_from_pointer symbol is present in linked binaries
  4. Check if JSON pointer parsing is in use
    Search source code for calls to cJSONUtils_ValidateJsonPointer, cJSONUtils_GetPointer, cJSONUtils_GetPointerCaseSensitive, or similar JSON pointer functions from cJSON_Utils.h
    Affected if Code calls JSON pointer functions from cJSON_Utils to process user-supplied JSON pointer strings
  5. Inspect input validation on JSON pointer strings
    Review code that passes JSON pointer strings to cJSON pointer functions. Check if validation exists to reject pointers with unexpected alphanumeric characters outside standard numeric array indices
    Affected if No input validation is performed on JSON pointer strings before passing them to cJSON pointer functions, allowing malformed pointers to reach the vulnerable function

Your environment is affected if cJSON version 1.5.0 through 1.7.18 is in use and your application processes JSON pointer strings through cJSON_Utils functions without strict input validation.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 1.7.18
Interim mitigation

Upgrade cJSON to a version beyond 1.7.18 where the vulnerability is patched, or implement strict input validation on JSON pointer strings before processing to reject malformed pointers.

Recommended fix High confidence

cJSON 1.7.19 or latest stable release

  1. Identify all projects and dependencies that include the cJSON library versions 1.5.0 through 1.7.18
  2. Locate the cJSON source code or package in your project dependencies (check package.json, conanfile.txt, CMakeLists.txt, or vendored copies)
  3. Upgrade cJSON to version 1.7.19 or later (latest stable release recommended)
  4. If using a package manager, update the dependency (e.g., conan install cJSON/1.7.19, or npm/pip depending on your package wrapper)
  5. If vendoring cJSON, replace the cJSON source files with the updated version from the official repository (https://github.com/DaveGamble/cJSON)
  6. Rebuild and test your application to ensure the library functions correctly after the upgrade
  7. Verify the fix resolves the vulnerability by testing with malformed JSON pointer strings containing alphanumeric characters
Caveat Minor: Review release notes for 1.7.19+ to check for any API changes; most releases are backward-compatible

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Cjson Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing8.0 h
  • Review / QA3.0 h
20.0 hours of engineering $3,420
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,472.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-57052 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-57052 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data