UltraJSON: Malformed/Truncated UTF-8 Accepted and Silently Rewritten in ujson.dumps() (CVE-2026-54911)
UltraJSON (ujson) versions prior to 5.13.0 have a vulnerability in the ujson.dumps() function when used with the reject_bytes=False option. Malformed or truncated UTF-8 byte sequences are silently rewritten into different Unicode characters instead of being rejected, causing input validation bypass and data integrity issues. This affects applications relying on this option for UTF-8 handling. The issue was fixed in UltraJSON 5.13.0.
AI Analysis
Technical Summary
The ujson.dumps(), ujson.dump(), and ujson.encode() functions in UltraJSON with reject_bytes=False improperly handle malformed or truncated UTF-8 byte sequences by silently rewriting invalid bytes into valid Unicode characters rather than rejecting them. This behavior breaks the expected equivalence between input bytes and the output of a dump-load cycle, leading to potential data integrity problems and validation bypass. The flaw was corrected by adding proper UTF-8 validation checks in commit 169eaf36b1116fece5034ee79a7a0ef3f6deedcf and is fixed in UltraJSON version 5.13.0.
Potential Impact
Applications using ujson.dumps() with reject_bytes=False may experience data integrity issues due to silent rewriting of malformed UTF-8 sequences. Validation mechanisms that rely on byte-level checks before serialization can be bypassed, potentially allowing invalid or unexpected data to be processed or stored.
Mitigation Recommendations
Upgrade UltraJSON to version 5.13.0 or later, where the UTF-8 validation issue is fixed. As a workaround, decode bytes to strings in Python before passing them to ujson.dumps() to avoid the vulnerability.
UltraJSON: Malformed/Truncated UTF-8 Accepted and Silently Rewritten in ujson.dumps() (CVE-2026-54911)
Description
UltraJSON (ujson) versions prior to 5.13.0 have a vulnerability in the ujson.dumps() function when used with the reject_bytes=False option. Malformed or truncated UTF-8 byte sequences are silently rewritten into different Unicode characters instead of being rejected, causing input validation bypass and data integrity issues. This affects applications relying on this option for UTF-8 handling. The issue was fixed in UltraJSON 5.13.0.
CVSS v3.1
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ujson.dumps(), ujson.dump(), and ujson.encode() functions in UltraJSON with reject_bytes=False improperly handle malformed or truncated UTF-8 byte sequences by silently rewriting invalid bytes into valid Unicode characters rather than rejecting them. This behavior breaks the expected equivalence between input bytes and the output of a dump-load cycle, leading to potential data integrity problems and validation bypass. The flaw was corrected by adding proper UTF-8 validation checks in commit 169eaf36b1116fece5034ee79a7a0ef3f6deedcf and is fixed in UltraJSON version 5.13.0.
Potential Impact
Applications using ujson.dumps() with reject_bytes=False may experience data integrity issues due to silent rewriting of malformed UTF-8 sequences. Validation mechanisms that rely on byte-level checks before serialization can be bypassed, potentially allowing invalid or unexpected data to be processed or stored.
Mitigation Recommendations
Upgrade UltraJSON to version 5.13.0 or later, where the UTF-8 validation issue is fixed. As a workaround, decode bytes to strings in Python before passing them to ujson.dumps() to avoid the vulnerability.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-3j69-69wj-xqx2
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-54911"]
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a5bd3182a4a8d5989284fe4
Added to database: 07/18/2026, 19:25:12 UTC
Last enriched: 07/18/2026, 19:26:40 UTC
Last updated: 07/29/2026, 20:52:05 UTC
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.