UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in…
Priority LOW 28CWE-787Published · Updated
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-787 and the CVSS impact.
Summary
UltraJSON (aka ujson) through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode). Exploitation can, for example, use a large amount of indentation.
Why it matters now
EPSS 0.01667 76th percentileScored 2026-11-08
Public exploit Yes 3 exploit referencesTagged by NVD
Fix Fixed ujson (PyPI): 5.2.0
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | ujson (PyPI) | 1.34 to before 5.2.0 | 5.2.0 | Patch available | GHSA-fh56-85cw-5pq6 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- ujson (PyPI) Vendor— Affected 1.34 to before 5.2.0 Fixed in 5.2.0 Patch available GHSA-fh56-85cw-5pq6
CPE configurations NVD · 5
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:ultrajson_project:ultrajson:*:*:*:*:*:python:*:* | before 5.2.0 | Vulnerable | ultrajson |
| cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* | 9.0 | Vulnerable | Debian |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* | 36 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
- cpe:2.3:a:ultrajson_project:ultrajson:*:*:*:*:*:python:*:* Versions before 5.2.0 Vulnerable ·ultrajson
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* Versions 9.0 Vulnerable ·Debian
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-fh56-85cw-5pq6 ujson (PyPI) Fixed in 5.2.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2021-45958
- 2026-10-03 Alias added: GHSA-fh56-85cw-5pq6
References
Exploit 3
Patch 2
Advisory 7
Other 7
- https://github.com/ultrajson/ultrajson/pull/519
- https://github.com/pypa/advisory-database/tree/main/vulns/ujson/PYSEC-2022-25.yaml
- https://github.com/ultrajson/ultrajson
- https://lists.fedoraproject.org/archives/list/[email protected]/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ
- https://lists.fedoraproject.org/archives/list/[email protected]/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2
- https://lists.fedoraproject.org/archives/list/[email protected]/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6
Sources
- CVE-2021-45958 · CVE Program
- CVE-2021-45958 · NVD
- FIRST EPSS
- GHSA-fh56-85cw-5pq6 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences