Skip to content
OpenAdvisories
Medium · 5.9 CVE-2022-31117 EUVD-2022-6334GHSA-fm67-cv37-96ffPYSEC-2026-1056

Double free of buffer during string decoding in ujson

Published Jul 5, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

Description

UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. In versions prior to 5.4.0 an error occurring while reallocating a buffer for string decoding can cause the buffer to get freed twice. Due to how UltraJSON uses the internal decoder, this double free is impossible to trigger from Python. This issue has been resolved in version 5.4.0 and all users should upgrade to UltraJSON 5.4.0. There are no known workarounds for this issue.

Affected products

VendorProductAffectedFixed
ultrajson ultrajson < 5.4.0 —

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.4.0-1 —
Debian 13 ujson 5.4.0-1 —
Debian 12 ujson 5.4.0-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 +1 No fix yet —
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS pandas No fix yet —
Ubuntu 18.04 LTS pandas +1 No fix yet —
Ubuntu 16.04 LTS pandas +1 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 20.04 LTS ujson 1.35-4ubuntu0.1+esm1 USN-6629-3
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
Red Hat OpenStack 16 python-ujson +1 2.0.3-3.el8ost RHSA-2022:8864, RHSA-2022:8850
ReleasePackageFixed inAdvisory
SLES 15 SP4 python-ujson 1.35-150100.3.5.1 SUSE-SU-2022:2673-1
SLES 15 SP3 python-ujson 1.35-150100.3.5.1 SUSE-SU-2022:2673-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.5.1 SUSE-SU-2022:2673-1
openSUSE Leap 15.3 python-ujson 1.35-150100.3.5.1 SUSE-SU-2022:2673-1
ReleasePackageFixed inAdvisory
Alpine v3.24 py3-ujson 5.4.0-r0 —
Alpine v3.23 py3-ujson 5.4.0-r0 —
Alpine v3.22 py3-ujson 5.4.0-r0 —
Alpine v3.21 py3-ujson 5.4.0-r0 —
Alpine v3.20 py3-ujson 5.4.0-r0 —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 py3-ujson 5.4.0-r0 —
Alpine v3.18 py3-ujson 5.4.0-r0 —
Alpine v3.17 py3-ujson 5.4.0-r0 —
Alpine v3.16 py3-ujson 5.4.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI ujson < 5.4.0 5.4.0 GHSA-fm67-cv37-96ff

Advisories 7

References