Vulnerability · Published Jul 5, 2022 · Assigned by GitHub_M

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

Medium 5.9

In plain English

A medium-severity double free in ultrajson from ultrajson. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.9% (higher than 80% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)1.9%top 20.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20py3-ujson5.4.0-r0ALPINE-CVE-2022-31117
Alpine:v3.21py3-ujson5.4.0-r0ALPINE-CVE-2022-31117
Alpine:v3.22py3-ujson5.4.0-r0ALPINE-CVE-2022-31117
Alpine:v3.23py3-ujson5.4.0-r0ALPINE-CVE-2022-31117
Alpine:v3.24py3-ujson5.4.0-r0ALPINE-CVE-2022-31117
Debian:12ujson5.4.0-1DEBIAN-CVE-2022-31117
Debian:13ujson5.4.0-1DEBIAN-CVE-2022-31117
Debian:14ujson5.4.0-1DEBIAN-CVE-2022-31117
PyPIujson5.4.0PYSEC-2026-1056
PyPIujson5.4.0GHSA-fm67-cv37-96ff
Ubuntu:22.04:LTScollada2gltfno fix listedUBUNTU-CVE-2022-31117
Ubuntu:22.04:LTSpandasno fix listedUBUNTU-CVE-2022-31117
Ubuntu:24.04:LTSpandasno fix listedUBUNTU-CVE-2022-31117
Ubuntu:25.10pandasno fix listedUBUNTU-CVE-2022-31117
Ubuntu:26.04:LTSpandasno fix listedUBUNTU-CVE-2022-31117
Ubuntu:26.10pandasno fix listedUBUNTU-CVE-2022-31117

Affected products (as reported)

VendorProductVersions
ultrajson ultrajson < 5.4.0

Weakness: CWE-415 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

References