Live threats

All CVEs / Ultrajson Project

CVE-2022-31116Ultrajson Project Ultrajson

High 7.5 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Ultrajson.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
ultrajson_projectultrajson< 5.4.0
fedoraprojectfedora35
fedoraprojectfedora36

Official sources

References

Links published by the sources. Open them with care.