CVE-2021-45958Ultrajson Project Ultrajson
Medium 5.5
Follow: this CVE · Ultrajson Project · Ultrajson Project Ultrajson We alert you by email or Slack (account required).
- Priority
- 33
- CVSS 3.1
- 5.5
- EPSS
- 1.7% probability of exploitation in 30 days · percentile 77
- Auth required
- Yes
- Published
- Jan 1, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-787
- Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Ultrajson.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | ujson |
≥ 1.34 < 5.2.0 |
5.2.0 |
pip install "ujson>=5.2.0" |
| PyPI | ujson |
≥ 4.0.2 < 5.1.0 |
5.1.0 |
pip install "ujson>=5.1.0" |
Per OSV / GitHub Advisories (GHSA-fh56-85cw-5pq6, PYSEC-2022-25). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ultrajson_project | ultrajson | < 5.2.0 |
| debian | debian_linux | 9.0 |
| fedoraproject | fedora | 35 |
| fedoraproject | fedora | 36 |
| fedoraproject | fedora | 37 |
Official sources
References
Links published by the sources. Open them with care.
- bugs.chromium.org Exploit Issue Tracking Third Party Advisory
- github.com Exploit Third Party Advisory
- github.com Exploit Issue Tracking Third Party Advisory
- github.com Issue Tracking Patch Third Party Advisory
- github.com Patch Third Party Advisory
- lists.debian.org Mailing List Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org