CVE-2026-32874: Ujson Denial of Service Vulnerability
HIGHCVE-2026-32874 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-401: Missing Release of Memory after Effective Lifetime) affecting Ujson libraries in the PyPI ecosystem. The issue involves ultrajson has a memory leak parsing large integers allows dos. Remediation is available by upgrading affected packages to version 5.12.0.
CVE-2026-32874 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-32874
To remediate this vulnerability, upgrade all affected Ujson dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install ujson>=5.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ujson
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-32874, inspect your installed packages using pip:
pip show ujson
Analyze the terminal output to locate any version of Ujson in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.12.0), your application is affected.
Note: The pip show ujson command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-401: Missing Release of Memory after Effective Lifetime, where the product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse. In Ujson, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-32874 Affected Ujson Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ujson
|
PyPI |
≥ 5.4.0
< 5.12.0
|
5.12.0
|
References
Frequently Asked Questions
What is CVE-2026-32874?
Which Ujson versions are affected?
What version fixes CVE-2026-32874?
Is ujson affected?
What is the CVSS score of CVE-2026-32874?
What CWE is associated with CVE-2026-32874?
How can I check PyPI dependencies for CVE-2026-32874?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wgvc-ghv9-3pmm",
"modified" : "2026-03-20T21:19:48Z",
"published" : "2026-03-18T13:01:15Z",
"aliases" : [ "CVE-2026-32874" ],
"summary" : "UltraJSON has a Memory Leak parsing large integers allows DoS ",
"details" : "#### Summary\n\nujson 5.4.0 to 5.11.0 inclusive contain an accumulating memory leak in JSON parsing _large_ (outside of the range [-2^63, 2^64 - 1]) integers.\n\n#### Exploitability\n\nAny service that calls `ujson.load()`/`ujson.loads()`/`ujson.decode()` on untrusted inputs is affected and vulnerable to denial of service attacks.\n\n#### Details\n\nThe 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.\n\n```python\nujson.loads(str(2 ** 64 - 1)) # No leak\nujson.loads(str(2 ** 64)) # Leaks\nujson.loads(str(10 ** sys.get_int_max_str_digits())) # Leaks and raises ValueError\n```\n\n#### Fix\n\nThe leak is fixed in `ujson 5.12.0` (4baeb950df780092bd3c89fc702a868e99a3a1d2). There are no workarounds beyond upgrading to an unaffected version.\n\n#### Credits\n\nDiscovered by Cameron Criswell/Skevros using Coverage-guided fuzzing (libFuzzer + AddressSanitizer)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ujson"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.4.0"
}, {
"fixed" : "5.12.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.11.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ultrajson/ultrajson/security/advisories/GHSA-wgvc-ghv9-3pmm"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32874"
}, {
"type" : "WEB",
"url" : "https://github.com/ultrajson/ultrajson/commit/4baeb950df780092bd3c89fc702a868e99a3a1d2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ultrajson/ultrajson"
}, {
"type" : "WEB",
"url" : "https://github.com/ultrajson/ultrajson/releases/tag/5.12.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-401" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-18T13:01:15Z",
"nvd_published_at" : "2026-03-20T02:16:35Z"
}
}