CVE-2022-31116
published high CVSS 3.1 · 7.5Incorrect handling of invalid surrogate pair characters in ujson
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| ultrajson | — | ultrajson< 5.4.0 | Affected | Not stated | GitHub_M |
| Alpine Linux | edge | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| SUSE / openSUSE | SLE-15-SP3 | python2-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| Ubuntu | bionic | python-ujson | Advisory build | 1.35-2ubuntu0.1~esm1 | USN-6629-1 |
| Alpine Linux | v3.16 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.17 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.18 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.19 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
Show 65 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.20 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.21 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.22 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.23 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| Alpine Linux | v3.24 | py3-ujson | Fixed | 5.4.0-r0 | Package fix record |
| SUSE / openSUSE | SLE-15-SP3 | python2-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python2-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python2-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python3-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python3-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python3-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP3 | python3-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python2-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python2-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python2-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python2-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python3-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python3-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python3-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | SLE-15-SP4 | python3-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python2-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python2-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python2-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python2-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python3-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python3-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python3-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.3 | python3-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | python3-ujsonaarch64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | python3-ujsonppc64le | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | python3-ujsons390x | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Leap-15.4 | python3-ujsonx86_64 | Advisory build | 1.35-150100.3.5.1 | SUSE-SU-2022:2673-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-ujsonaarch64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-ujsonppc64le | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-ujsons390x | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python310-ujsonx86_64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-ujsonaarch64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-ujsonppc64le | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-ujsons390x | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python311-ujsonx86_64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-ujsonaarch64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-ujsonppc64le | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-ujsons390x | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python312-ujsonx86_64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-ujsonaarch64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-ujsonppc64le | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-ujsons390x | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-ujsonx86_64 | Advisory build | 5.10.0-1.5 | OPENSUSE-SU-2025:15107-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python38-ujsonaarch64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python38-ujsonppc64le | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python38-ujsons390x | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python38-ujsonx86_64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python39-ujsonaarch64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python39-ujsonppc64le | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python39-ujsons390x | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python39-ujsonx86_64 | Advisory build | 5.4.0-1.1 | OPENSUSE-SU-2024:12183-1 |
| Ubuntu | bionic | python3-ujson | Advisory build | 1.35-2ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu | bionic | ujson | Advisory build | 1.35-2ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu | focal | python3-ujson | Advisory build | 1.35-4ubuntu0.1+esm1 | USN-6629-3 |
| Ubuntu | focal | ujson | Advisory build | 1.35-4ubuntu0.1+esm1 | USN-6629-3 |
| Ubuntu | jammy | python3-ujson | Advisory build | 5.1.0-1ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu | jammy | ujson | Advisory build | 5.1.0-1ubuntu0.1~esm1 | USN-6629-1 |
| Ubuntu | xenial | python-ujson | Advisory build | 1.33-1ubuntu0.1~esm2 | USN-6629-1 |
| Ubuntu | xenial | python3-ujson | Advisory build | 1.33-1ubuntu0.1~esm2 | USN-6629-1 |
| Ubuntu | xenial | ujson | Advisory build | 1.33-1ubuntu0.1~esm2 | USN-6629-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| ultrajson | ultrajson | < 5.4.0 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-670 CWE-670: Always-Incorrect Control Flow Implementation
References
4- https://github.com/ultrajson/ultrajson/commit/67ec07183342589d602e0fcf7bb1ff3e19272687
- https://github.com/ultrajson/ultrajson/security/advisories/GHSA-wpqr-jcpx-745r
- FEDORA-2022-33e816bc37 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NAU5N4A7EUK2AMUCOLYDD5ARXAJYZBD2/
- FEDORA-2022-1b2b8d5177 https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OPPU5FZP3LCTXYORFH7NHUMYA5X66IA7/
Provider assertions
3GitHub_M · cna
Incorrect handling of invalid surrogate pair characters in ujson
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- b80e93586539185618b43d9a2ce85306ac82c392be6bebf1061a4ae6e596573d
- Ingested
- 23 Sep 2026, 08:00:25 UTC
- Source record
- Official CVE record