Nixpkgs security tracker

Login with GitHub

Details of issue NIXPKGS-2026-2286

NIXPKGS-2026-2286
published 2 days, 21 hours ago
Integer Overflow Leading to Heap Buffer Overflow in cJSON
Permalink CVE-2026-16554
5.1 MEDIUM
  • CVSS version (CVSS): 4.0
  • Attack Vector (AV): Local (L)
  • Attack Complexity (AC): Low (L)
  • Attack Requirement (AT): None (N)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): None (N)
  • Vulnerable System Impact Confidentiality (VC): None (N)
  • Vulnerable System Impact Integrity (VI): None (N)
  • Vulnerable System Impact Availability (VA): Low (L)
  • Subsequent System Impact Confidentiality (SC): Low (L)
  • Subsequent System Impact Integrity (SI): Low (L)
  • Subsequent System Impact Availability (SA): Low (L)
  • Modified Attack Vector (MAV): Local (L)
  • Modified Attack Complexity (MAC): Low (L)
  • Modified Attack Requirement (MAT): None (N)
  • Modified Privileges Required (MPR): None (N)
  • Modified User Interaction (MUI): None (N)
  • Modified Vulnerable System Impact Confidentiality (MVC): None (N)
  • Modified Vulnerable System Impact Integrity (MVI): None (N)
  • Modified Vulnerable System Impact Availability (MVA): Low (L)
  • Modified Subsequent System Impact Confidentiality (MSC): Low (L)
  • Modified Subsequent System Impact Integrity (MSI): Low (L)
  • Modified Subsequent System Impact Availability (MSA): Low (L)
  • Safety (S): Not Defined (X)
  • Automatable (AU): Not Defined (X)
  • Recovery (R): Not Defined (X)
  • Value Density (V): Not Defined (X)
  • Vulnerability Response Effort (RE): Not Defined (X)
  • Provider Urgency (U): Not Defined (X)
  • Confidentiality Req. (CR): Not Defined (X)
  • Integrity Req. (IR): Not Defined (X)
  • Availability Req. (AR): Not Defined (X)
  • Exploit Maturity (E): Not Defined (X)
updated 2 days, 21 hours ago by @LeSuisse Activity log
  • Created suggestion
  • @LeSuisse ignored
    16 packages
    • fracjson
    • luaPackages.cjson
    • lua51Packages.cjson
    • lua52Packages.cjson
    • lua53Packages.cjson
    • lua54Packages.cjson
    • lua55Packages.cjson
    • luajitPackages.cjson
    • luaPackages.lua-cjson
    • lua51Packages.lua-cjson
    • lua52Packages.lua-cjson
    • lua53Packages.lua-cjson
    • lua54Packages.lua-cjson
    • lua55Packages.lua-cjson
    • luajitPackages.lua-cjson
    • chickenPackages_5.chickenEggs.cjson
  • @LeSuisse accepted
  • @LeSuisse published on GitHub
Integer Overflow Leading to Heap Buffer Overflow in cJSON

cJSON library is vulnerable to an integer overflow in the print_string_ptr() function in cJSON.c on 32-bit platforms. The escape_characters counter, a 32-bit size_t, can wrap around when processing strings containing approximately 858,993,460 or more control characters, causing the output buffer to be allocated based on an underestimated length. When cJSON_PrintBuffered() is used with a pre-allocated buffer, the subsequent write loop overflows the heap allocation. An attacker supplying a crafted JSON string to an application using cJSON on a 32-bit platform can cause a heap buffer overflow, potentially leading to remote code execution, information disclosure, or denial of service. Because project creator contact attempts were unsuccessful, the vulnerability has only been confirmed in version 1.7.19 but may also affect other versions.

Affected products

cJSON
  • ==1.7.19

Matching in nixpkgs

Ignored packages (16)

pkgs.fracjson

JSON formatter that produces compact, highly readable output

  • nixos-unstable -
    • nixpkgs-unstable 1.0.1
    • nixos-unstable-small 1.0.1

Package maintainers