Skip to content

CVE-2026-32875 UltraJSON has an integer overflow handling large indent leads to buffer overflow or infinite loop

HighCVSS 7.5 EPSS 0.54%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: yes · technical impact: partial
Technology
UbuntuDebianRed Hat

Description

UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.10 through 5.11.0 are vulnerable to buffer overflow or infinite loop through large indent handling. ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service. To be vulnerable, a service must call ujson.dump()/ujson.dumps()/ujson.encode() whilst giving untrusted users control over the indent parameter and not restrict that indentation to reasonably small non-negative values. A service may also be vulnerable to the infinite loop if it uses a fixed negative indent. An underflow always occurs for any negative indent when the input data is at least one level nested but, for small negative indents, the underflow is usually accidentally rectified by another overflow. This issue has been fixed in version 5.12.0.

Upgrade path

13 packages: 8 fixed, 3 with no fix yet.

PackageAffectedFixed inStatus
debian/ujson(Debian 12) = 5.7.0-1; = 5.8.0-1; = 5.9.0-1; = 5.10.0-1 +5 more No fix listed No fix yet
debian/ujson(Debian 13) = 5.10.0-1; = 5.11.0-1; = 5.11.0-2; = 5.11.0-3 +2 more No fix listed No fix yet
ubuntu/ujson(Ubuntu 26.10) All versions No fix listed No fix yet
alpine/py3-ujson(Alpine v3.23) < 5.12.0-r0 5.12.0-r0 Fixed
alpine/py3-ujson(Alpine v3.24) < 5.12.0-r0 5.12.0-r0 Fixed
debian/ujson(Debian 14) < 5.13.0-1; = 5.10.0-1; = 5.11.0-1; = 5.11.0-2 +1 more 5.13.0-1 Fixed
pypi ujson(PyPI) = 5.1.0; = 5.2.0; = 5.3.0; = 5.4.0 +9 more 5.12.0 Fixed
ubuntu/ujson(Ubuntu 22.04) < 5.1.0-1ubuntu0.1~esm2 5.1.0-1ubuntu0.1~esm2 Fixed
ubuntu/ujson(Ubuntu 24.04) < 5.9.0-1ubuntu0.1~esm1 5.9.0-1ubuntu0.1~esm1 Fixed
ubuntu/ujson(Ubuntu 26.04) < 5.11.0-3ubuntu0.1 5.11.0-3ubuntu0.1 Fixed
ultrajson project ultrajson >= 5.1.0, < 5.12.0 5.12.0 Fixed
redhat openstack = 16.2; = 17.1; = 18.0 No fix listed Versions listed
ultrajson = >= 5.1.0, < 5.12.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
pypi ujson(PyPI) >= 5.1.0, < 5.12.0 5.12.0
pypi ujson(PyPI) = 5.1.0 No fix listed
pypi ujson(PyPI) = 5.10.0 No fix listed
pypi ujson(PyPI) = 5.11.0 No fix listed
pypi ujson(PyPI) = 5.2.0 No fix listed
pypi ujson(PyPI) = 5.3.0 No fix listed
pypi ujson(PyPI) = 5.4.0 No fix listed
pypi ujson(PyPI) = 5.5.0 No fix listed
pypi ujson(PyPI) = 5.6.0 No fix listed
pypi ujson(PyPI) = 5.7.0 No fix listed
pypi ujson(PyPI) = 5.8.0 No fix listed
pypi ujson(PyPI) = 5.9.0 No fix listed
ultrajson = >= 5.1.0, < 5.12.0 No fix listed
redhat openstack = 16.2 No fix listed
redhat openstack = 17.1 No fix listed
redhat openstack = 18.0 No fix listed
pypi ujson(PyPI) >= 5.1.0, <= 5.11.0 No fix listed
debian/ujson(Debian:12) All versions No fix listed
debian/ujson(Debian:12) = 5.10.0-1 No fix listed
debian/ujson(Debian:12) = 5.11.0-1 No fix listed
debian/ujson(Debian:12) = 5.11.0-2 No fix listed
debian/ujson(Debian:12) = 5.11.0-3 No fix listed
debian/ujson(Debian:12) = 5.13.0-1 No fix listed
debian/ujson(Debian:12) = 5.7.0-1 No fix listed
debian/ujson(Debian:12) = 5.8.0-1 No fix listed
Show 19 more
ProductAffected versionsFixed in
debian/ujson(Debian:12) = 5.9.0-1 No fix listed
debian/ujson(Debian:13) All versions No fix listed
debian/ujson(Debian:13) = 5.10.0-1 No fix listed
debian/ujson(Debian:13) = 5.11.0-1 No fix listed
debian/ujson(Debian:13) = 5.11.0-2 No fix listed
debian/ujson(Debian:13) = 5.11.0-3 No fix listed
debian/ujson(Debian:13) = 5.13.0-1 No fix listed
debian/ujson(Debian:14) < 5.13.0-1 5.13.0-1
debian/ujson(Debian:14) = 5.10.0-1 No fix listed
debian/ujson(Debian:14) = 5.11.0-1 No fix listed
debian/ujson(Debian:14) = 5.11.0-2 No fix listed
debian/ujson(Debian:14) = 5.11.0-3 No fix listed
ubuntu/ujson(Ubuntu:22.04) < 5.1.0-1ubuntu0.1~esm2 5.1.0-1ubuntu0.1~esm2
alpine/py3-ujson(Alpine:v3.23) < 5.12.0-r0 5.12.0-r0
alpine/py3-ujson(Alpine:v3.24) < 5.12.0-r0 5.12.0-r0
ubuntu/ujson(Ubuntu:24.04) < 5.9.0-1ubuntu0.1~esm1 5.9.0-1ubuntu0.1~esm1
ubuntu/ujson(Ubuntu:26.04) < 5.11.0-3ubuntu0.1 5.11.0-3ubuntu0.1
ubuntu/ujson(Ubuntu:26.10) All versions No fix listed
ultrajson project ultrajson >= 5.1.0, < 5.12.0 5.12.0

References