UltraJSON vulnerable to Out-of-bounds Write
UltraJSON (aka ujson) 1.34 through 5.1.0 has a stack-based buffer overflow in Buffer_AppendIndentUnchecked (called from encode).
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | ujson | >= 1.34, < 5.2.0 | 5.2.0 |
References
- https://github.com/google/oss-fuzz-vulns/blob/main/vulns/ujson/OSV-2021-955.yaml
- https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36009
- https://github.com/ultrajson/ultrajson/issues/501
- https://github.com/ultrajson/ultrajson/issues/502#issuecomment-1031747284
- https://github.com/advisories/GHSA-fh56-85cw-5pq6
- https://nvd.nist.gov/vuln/detail/CVE-2021-45958
- https://github.com/ultrajson/ultrajson/pull/504
- 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.debian.org/debian-lts-announce/2022/02/msg00023.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CN7W3GOXALINKFUUE7ICQIC2EF5HNKUQ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O6JUWQTJLA2CMG4CJN7DCUVSOXLZIIXL
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULX35TSWLBBIMEH44MUORPXYYRZKEDC6
- CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H- Weakness (CWE)
CWE-787- Platform
- Python (PyPI)
- Package
ujson- Disclosed
- 01.01.2022
- Updated
- 11.10.2026 11:20
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2022-25 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-fh56-85cw-5pq6 - CC BY 4.0
Vulnerability history: ujson
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 7
- First → latest
- 01.2022 06.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 4
- Medium 3
Disclosures per year
- 2022: 3
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 4
-
UltraJSON vulnerable to Out-of-bounds Write this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.