Skip to content
OpenAdvisories
Medium · 5.5 CVE-2021-45958 EUVD-2022-0348GHSA-fh56-85cw-5pq6PYSEC-2022-25

UltraJSON vulnerable to Out-of-bounds Write

Published Dec 31, 2021 · Updated Aug 4, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
SLE Real Time 15 SP3 python-ujson 1.35-150100.3.8.1 SUSE-SU-2023:2134-1
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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

EcosystemPackageAffectedFixedRecord
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

References