{"cve":"CVE-2022-31116","nvd":{"published":"2022-07-05T18:15:08.023","modified":"2026-06-17T04:44:50.177","status":"Modified","description":"UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Affected versions were found to improperly decode certain characters. JSON strings that contain escaped surrogate characters not part of a proper surrogate pair were decoded incorrectly. Besides corrupting strings, this allowed for potential key confusion and value overwriting in dictionaries. All users parsing JSON from untrusted sources are vulnerable. From version 5.4.0, UltraJSON decodes lone surrogates in the same way as the standard library's `json` module does, preserving them in the parsed output. Users are advised to upgrade. There are no known workarounds for this issue.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-670"],"references":["https://github.com/ultrajson/ultrajson/commit/67ec07183342589d602e0fcf7bb1ff3e19272687","https://github.com/ultrajson/ultrajson/security/advisories/GHSA-wpqr-jcpx-745r","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPPU5FZP3LCTXYORFH7NHUMYA5X66IA7/","https://github.com/ultrajson/ultrajson/commit/67ec07183342589d602e0fcf7bb1ff3e19272687"],"products":["fedoraproject:fedora","ultrajson_project:ultrajson"],"source":"nvd","synced_at":"2026-10-19T21:33:44.859608815+00:00"},"epss":{"cve":"CVE-2022-31116","score":0.02545,"percentile":0.85008,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-wpqr-jcpx-745r","url":"https://osv.dev/vulnerability/GHSA-wpqr-jcpx-745r","summary":"Incorrect handling of invalid surrogate pair characters","modified":"2026-07-07T11:56:38.194075630Z","packages":[{"ecosystem":"PyPI","name":"ujson","purl":"pkg:pypi/ujson","ranges":["<5.4.0"],"fixed":["5.4.0"]}]},{"id":"PYSEC-2026-1057","url":"https://osv.dev/vulnerability/PYSEC-2026-1057","summary":"Incorrect handling of invalid surrogate pair characters","modified":"2026-07-07T11:46:02.505267781Z","packages":[{"ecosystem":"PyPI","name":"ujson","purl":"pkg:pypi/ujson","ranges":["<5.4.0"],"fixed":["5.4.0"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}