CVEfocus › CVE database › CVE-2022-31117

CVE-2022-31117Double free of buffer during string decoding in ujson

CVSS 5.9 MediumEPSS 1.5% (higher than 75% of CVEs)Published 2022-07-05Updated 2025-04-23Assigner: GitHub_M

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.

CWE-415

What to do

Fixed builds are available from Alpine, Debian, PyPI: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

13Fixed
3Fix pending
4Under investigation
8Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10pandasFix pendingUBUNTU-CVE-2022-31117
Ubuntu 26.04pandasUnder investigationUBUNTU-CVE-2022-31117
Ubuntu 26.04ujsonNot affected
vulnerable_code_not_present
Ubuntu 25.10pandasWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 25.10ujsonNot affected
vulnerable_code_not_present
Ubuntu 24.04pandasUnder investigationUBUNTU-CVE-2022-31117
Ubuntu 22.04collada2gltfUnder investigationUBUNTU-CVE-2022-31117
Ubuntu 22.04pandasUnder investigationUBUNTU-CVE-2022-31117
Ubuntu 22.04ujsonFix pending5.1.0-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-31117
Ubuntu 20.04pandasWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 18.04collada2gltfWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 18.04pandasWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 18.04ujsonFix pending1.35-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2022-31117
Ubuntu 16.04collada2gltfWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 16.04pandasWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Ubuntu 16.04ujsonWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
1.33-1ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2022-31117
Ubuntu 14.04pandasWill not fix
the embedded ujson code in pandas, eventhough containing similar content as the upstream ujson code, seems to have diverged from the ujson upstream project…
UBUNTU-CVE-2022-31117
Debian 14ujsonFixed5.4.0-1DEBIAN-CVE-2022-31117
Debian 13ujsonFixed5.4.0-1DEBIAN-CVE-2022-31117
Debian 12ujsonFixed5.4.0-1DEBIAN-CVE-2022-31117
Alpine Linux 3.24py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.23py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.22py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.21py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.20py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.19py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.18py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.17py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
Alpine Linux 3.16py3-ujsonFixed5.4.0-r0ALPINE-CVE-2022-31117
PyPI libraryujsonFixed5.4.0PYSEC-2026-1056

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.