CVE-2022-31116Ultrajson Project Ultrajson
High 7.5 No auth needed
Follow: this CVE · Ultrajson Project · Ultrajson Project Ultrajson We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 2.0% probability of exploitation in 30 days · percentile 81
- Auth required
- No
- Published
- Jul 5, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-670
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Ultrajson.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | ujson |
< 5.4.0 |
5.4.0 |
pip install "ujson>=5.4.0" |
| PyPI | ujson |
< 5.4.0 |
5.4.0 |
pip install "ujson>=5.4.0" |
Per OSV / GitHub Advisories (GHSA-wpqr-jcpx-745r, PYSEC-2026-1057). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| ultrajson_project | ultrajson | < 5.4.0 |
| fedoraproject | fedora | 35 |
| fedoraproject | fedora | 36 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Exploit Third Party Advisory
- lists.fedoraproject.org
- lists.fedoraproject.org