Quick answers
- Is CVE-2026-32874 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-32874 being exploited in the wild.
- How severe is CVE-2026-32874?
- High severity, with a CVSS score of 7.5, published 20 March 2026.
- Which products and versions are affected?
- ujson (PyPI) ECOSYSTEM:introduced=5.4.0,fixed=5.12.0; UltraJSON >= 5.4.0, < 5.12.0.
- Is there a fix for CVE-2026-32874?
- Yes. ujson (PyPI): upgrade to 5.12.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-32874 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-32874?
- Check whether you run ujson (PyPI) or UltraJSON at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- ujson (PyPI): upgrade to 5.12.0 or later
pip install "ujson>=5.12.0"
Technical details
A memory leak exists in UltraJSON's C implementation when parsing integers outside the range of [-2^63, 2^64 - 1]. The root cause is located in 'src/ujson/python/JSONtoObj.c' within the 'Object_newIntegerFromString' function, where memory allocated via 'PyObject_Malloc' for a string representation of the integer was not released after calling 'PyLong_FromString'. An attacker can exploit this by sending JSON payloads containing many large integers to any service using 'ujson.load()', 'ujson.loads()', or 'ujson.decode()'. This leak occurs even if the integer is eventually rejected by Python's 'sys.get_int_max_str_digits()' limit, allowing for arbitrary memory exhaustion. The issue is fixed in version 5.12.0 by adding the missing 'PyObject_Free' call.
Affected products
- ultrajson UltraJSON (ujson) >= 5.4.0, < 5.12.0
Identifiers
- CVE-2026-32874
- GHSA-wgvc-ghv9-3pmm
- PYSEC-2026-2291
Timeline
- 2026-03-11: patched: Version 5.12.0 released with fix.
- 2026-03-17: advisory: GitHub Security Advisory published.
- 2026-03-20: disclosed: CVE-2026-32874 published to NVD.
References
- https://github.com/ultrajson/ultrajson/commit/4baeb950df780092bd3c89fc702a868e99a3a1d2
- https://github.com/ultrajson/ultrajson/releases/tag/5.12.0
- https://github.com/ultrajson/ultrajson/security/advisories/GHSA-wgvc-ghv9-3pmm
- https://access.redhat.com/security/cve/CVE-2026-32874
- https://bugzilla.redhat.com/show_bug.cgi?id=2449411
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-32874.json