cve.bz

CVE-2022-31117 Double Free

5.9 mediumEPSS 1.9%Fix available

Medium (5.9). EPSS 1.9% estimated probability of exploitation activity in the next 30 days. Fixed in ujson 5.4.0.

On this page
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.

Severity

CVSS 3.1

5.9 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 80th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2025-04-23. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-415 Double Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-31117 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-31117?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-31117?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-31117 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
ultrajson_project:ultrajsonbefore 5.4.0
fedoraproject:fedora35
fedoraproject:fedora36

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-fm67-cv37-96ffPyPIujson<5.4.05.4.0
PYSEC-2026-1056PyPIujson<5.4.05.4.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14ujson5.4.0-1DEBIAN-CVE-2022-31117
Ubuntu14.04:LTS, 20.04:LTS, 24.04:LTS and 3 morepandasno fix listedUBUNTU-CVE-2022-31117
Ubuntu16.04:LTS, 18.04:LTS, 22.04:LTSpandas, collada2gltfno fix listedUBUNTU-CVE-2022-31117
UbuntuPro:16.04:LTSujson1.33-1ubuntu0.1~esm2UBUNTU-CVE-2022-31117 USN-6629-1
UbuntuPro:18.04:LTSujson1.35-2ubuntu0.1~esm1UBUNTU-CVE-2022-31117 USN-6629-1
UbuntuPro:20.04:LTSujson1.35-4ubuntu0.1+esm1USN-6629-3
UbuntuPro:22.04:LTSujson5.1.0-1ubuntu0.1~esm1UBUNTU-CVE-2022-31117 USN-6629-1
Red Hatopenstack:16.1::el8python-ujson, python3-ujson, python3-ujson-debuginfo and 1 more0:2.0.3-3.el8ostRHSA-2022:8864
Red Hatopenstack:16.2::el8python-ujson, python3-ujson, python3-ujson-debuginfo and 1 more0:2.0.3-3.el8ostRHSA-2022:8850
SUSELinux Enterprise Module for Development Tools 15 SP3, Linux Enterprise Module for Development Tools 15 SP4, Linux Enterprise Module for Package Hub 15 SP3 and 1 morepython-ujson1.35-150100.3.5.1SUSE-SU-2022:2673-1
openSUSELeap 15.3, Leap 15.4python-ujson1.35-150100.3.5.1SUSE-SU-2022:2673-1
openSUSETumbleweedpython-ujson5.10.0-1.5openSUSE-SU-2025:15107-1
Alpinev3.16, v3.17, v3.18 and 6 morepy3-ujson5.4.0-r0ALPINE-CVE-2022-31117

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat OpenStack Platform 16.1python-ujson-0:2.0.3-3.el8ostFixed 2022-12-07RHSA-2022:8864
Red Hat OpenStack Platform 16.2python-ujson-0:2.0.3-3.el8ostFixed 2022-12-07RHSA-2022:8850
Red Hat OpenStack Platform 13 (Queens)python-ujsonOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-31117.

References

Check your stackJSON