{"id":"CVE-2022-31117","published":"2022-07-05T17:30:13Z","modified":"2025-04-23T18:05:03Z","title":"Double free of buffer during string decoding in ujson","vendor":"ultrajson","product":"ultrajson","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01513,"percentile":0.74751,"provenance":"source"},"cwes":[{"id":"CWE-415","name":"Double Free"}],"references":[{"url":"https://github.com/ultrajson/ultrajson/security/advisories/GHSA-fm67-cv37-96ff","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/ultrajson/ultrajson/commit/9c20de0f77b391093967e25d01fb48671104b15b","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPPU5FZP3LCTXYORFH7NHUMYA5X66IA7/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":19.1,"factors":[{"name":"EPSS percentile","points":14.95},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"ultrajson","affectedVersions":[{"vendor":"ultrajson","product":"ultrajson","versions":["< 5.4.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:03:59.440728Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"ujson","vulnerableRanges":["<5.4.0"],"patched":["5.4.0"],"from":["GHSA-fm67-cv37-96ff","PYSEC-2026-1056"],"provenance":"source"}],"summary":{"text":"The flaw is a double free of a buffer during string decoding in the ujson component of the ultrajson product, which affects versions prior to 5.4.0. An attacker with network access and no authentication or user interaction could crash the process.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:16:12Z"},"euvd":{"id":"EUVD-2022-6334","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-ultrajson-cve-2022-31116","parents":[{"from":"CVE-2022-31116","to":"CVE-2022-31117","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/ultrajsondec.c"],"commits":["https://github.com/ultrajson/ultrajson/commit/67ec07183342589d602e0fcf7bb1ff3e19272687","https://github.com/ultrajson/ultrajson/commit/9c20de0f77b391093967e25d01fb48671104b15b"],"basis":"shared function","functions":["DecoderState"]}]}],"packageHistory":[{"cve":"CVE-2021-45958","published":"2021-12-31","fixed":"5.2.0","kev":false,"link":{"from":"CVE-2021-45958","to":"CVE-2022-31117","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:ujson","fromFixed":"5.2.0","toFixed":"5.4.0","daysApart":186}]}},{"cve":"CVE-2022-31116","published":"2022-07-05","fixed":"5.4.0","kev":false},{"cve":"CVE-2022-31117","published":"2022-07-05","fixed":"5.4.0","kev":false},{"cve":"CVE-2026-32874","published":"2026-03-20","fixed":"5.12.0","kev":false},{"cve":"CVE-2026-32875","published":"2026-03-20","fixed":"5.12.0","kev":false},{"cve":"CVE-2026-44660","published":"2026-05-27","fixed":"5.12.1","kev":false}],"package":"PyPI:ujson"}}