ujson — security advisory
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.
- Products
- ujson
- Affected versions
- Not specified
- Fixed versions
- 5.4.0-1
- CVEs
- CVE-2022-31117
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 30 Oct 2026, 14:57 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2022-31117
ujson
Fixed versions: 5.4.0-1
ujson
Fixed versions: 5.4.0-1
ujson
Fixed versions: 5.4.0-1
Complete source record
{
"id": "1881e32a0d55eec5ce4e1e3cc966c3ce53369c9f492362d5777c7be026963f66",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2022-31117",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2022-31117",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2022-31117",
"products": [
{
"name": {
"value": "ujson",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.0-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "ujson",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.0-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "ujson",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.0-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2022-31117",
"aliases": [
"DEBIAN-CVE-2022-31117"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.4.0-1"
}
]
}
],
"package": {
"name": "ujson",
"purl": "pkg:deb/debian/ujson?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-31117.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.4.0-1"
}
]
}
],
"package": {
"name": "ujson",
"purl": "pkg:deb/debian/ujson?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-31117.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "5.4.0-1"
}
]
}
],
"package": {
"name": "ujson",
"purl": "pkg:deb/debian/ujson?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2022-31117.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-15T08:02:38.471381935Z",
"provider": "osv",
"upstream": [
"CVE-2022-31117"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2022-31117"
]
},
"related_cves": [
{
"value": "CVE-2022-31117",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 323840,
"published_at": "2022-07-05T18:15:08.087+00:00"
}