Description
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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | ujson | 5.2.0-1 | — |
| Debian 13 | ujson | 5.2.0-1 | — |
| Debian 12 | ujson | 5.2.0-1 | — |
| Debian 9 | ujson | 1.35-1+deb9u1 | DLA-2929-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pandas | No fix yet | — |
| Ubuntu 26.04 LTS | pandas | No fix yet | — |
| Ubuntu 25.10 | pandas | No fix yet | — |
| Ubuntu 24.04 LTS | pandas | No fix yet | — |
| Ubuntu 22.04 LTS | pandas | No fix yet | — |
Show 7 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | pandas | No fix yet | — |
| Ubuntu 20.04 LTS | ujson | 1.35-4ubuntu0.1 | USN-6629-2 |
| Ubuntu 18.04 LTS | pandas | No fix yet | — |
| Ubuntu 16.04 LTS | pandas | No fix yet | — |
| Ubuntu 14.04 LTS | pandas | No fix yet | — |
| Ubuntu Pro 22.04 LTS | ujson | 5.1.0-1ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu Pro 18.04 LTS | ujson | 1.35-2ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu Pro 16.04 LTS | ujson | 1.33-1ubuntu0.1~esm2 | USN-6629-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP4 | python-ujson | 1.35-150100.3.8.1 | SUSE-SU-2023:2134-1 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLE Real Time 15 SP3 | python-ujson | 1.35-150100.3.8.1 | SUSE-SU-2023:2134-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-ujson | 5.10.0-1.5 | openSUSE-SU-2025:15107-1 |
| openSUSE Leap 15.4 | python-ujson | 1.35-150100.3.8.1 | SUSE-SU-2023:2134-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.23 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.22 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.21 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.20 | py3-ujson | 5.2.0-r0 | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.18 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.17 | py3-ujson | 5.2.0-r0 | — |
| Alpine v3.16 | py3-ujson | 5.2.0-r0 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | ujson | >= 1.34, < 5.2.0 | 5.2.0 | GHSA-fh56-85cw-5pq6 |
| PyPI | ujson | >= 4.0.2, < 5.1.0 | 5.1.0 | PYSEC-2022-25 |
Advisories 5
- USN-6629-1 ujson vulnerabilities Ubuntu Security Notices (USN) · Jun 25, 2026
- USN-6629-2 ujson vulnerability Ubuntu Security Notices (USN) · Apr 27, 2026
- DLA-2929-1 ujson - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2025:15107-1 python311-ujson-5.10.0-1.5 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2023:2134-1 Security update for python-ujson SUSE / openSUSE Security Updates · May 2, 2025
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/502#issuecomment-1031747284
- https://github.com/ultrajson/ultrajson/issues/501
- https://github.com/ultrajson/ultrajson/pull/504
- [debian-lts-announce] 20220226 [SECURITY] [DLA 2929-1] ujson security update mailing-list
- FEDORA-2022-dbf6e00ba8 vendor-advisory
- FEDORA-2022-569b6b45e2 vendor-advisory
- FEDORA-2022-d1452fd421 vendor-advisory
- FEDORA-2022-33e816bc37 vendor-advisory