UltraJSON has a Memory Leak parsing large integers allows DoS
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-401.
Summary
UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.4.0 through 5.11.0 contain an accumulating memory leak in JSON parsing large (outside of the range [-2^63, 2^64 - 1]) integers. The leaked memory is a copy of the string form of the integer plus an additional NULL byte. The leak occurs irrespective of whether the integer parses successfully or is rejected due to having more than sys.get_int_max_str_digits() digits, meaning that any sized leak per malicious JSON can be achieved provided that there is no limit on the overall size of the payload. Any service that calls ujson.load()/ujson.loads()/ujson.decode() on untrusted inputs is affected and vulnerable to denial of service attacks. This issue has been fixed in version 5.12.0.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| ultrajson | ultrajson | 5.4.0 to before 5.12.0 | 5.12.0 | Patch available | CNA |
| — | ujson (PyPI) | 5.4.0 to before 5.12.0 | 5.12.0 | Patch available | GHSA-wgvc-ghv9-3pmm |
- ultrajson Vendorultrajson Affected 5.4.0 to before 5.12.0 Fixed in 5.12.0 Patch available CNA
- ujson (PyPI) Vendor— Affected 5.4.0 to before 5.12.0 Fixed in 5.12.0 Patch available GHSA-wgvc-ghv9-3pmm
Remediation
- Fix · CNA ultrajson (ultrajson) Fixed in 5.12.0
- Fix · GHSA-wgvc-ghv9-3pmm ujson (PyPI) Fixed in 5.12.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 3 products
- Red Hat OpenStack Platform 16.2
- Red Hat OpenStack Platform 17.1
- Red Hat OpenStack Platform 18.0
Timeline
- 2026-10-02 Threatist record created from CVE-2026-32874
- 2026-10-03 Alias added: GHSA-wgvc-ghv9-3pmm
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-10-25 Priority changed: MEDIUM → LOW
References
Advisory 2
More Ultrajson vulnerabilities
- TI-2026-32560 UltraJSON: Memory Leak in ujson.dump() on Write Failure CVSS 4.0HIGH 8.7
- TI-2026-25335 UltraJSON has an integer overflow handling large indent leads to buffer overflow or infinite loop CVSS 3.1HIGH 7.5
- TI-2022-13160 Incorrect handling of invalid surrogate pair characters in ujson CVSS 3.1HIGH 7.5
- TI-2026-39683 UltraJSON: Malformed/Truncated UTF-8 Accepted and Silently Rewritten in ujson.dumps() CVSS 3.1MEDIUM 6.5
- TI-2022-13161 Double free of buffer during string decoding in ujson CVSS 3.1MEDIUM 5.9
- TI-2021-20961 UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in… CVSS 3.1MEDIUM 5.5
Sources
- CVE-2026-32874 · CVE Program
- CVE-2026-32874 · NVD
- FIRST EPSS
- GHSA-wgvc-ghv9-3pmm · GitHub Advisory Database · CC BY 4.0
- CVE-2026-32874 · 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