Live threats

All CVEs / Ultrajson Project

CVE-2021-45958Ultrajson Project Ultrajson

Medium 5.5

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Ultrajson.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
ultrajson_projectultrajson< 5.2.0
debiandebian_linux9.0
fedoraprojectfedora35
fedoraprojectfedora36
fedoraprojectfedora37

Official sources

References

Links published by the sources. Open them with care.