portage-ng / portage / dev-python / ujson / 5.13.0
portage-ng glsa
1 advisory reference dev-python/ujson · none place version 5.13.0 in a vulnerable range
▸ GLSA 202403-03 UltraJSON: Multiple Vulnerabilities this version unaffected normal remote 2024-03-03

Multiple vulnerabilities have been discovered in UltraJSON, the worst of which could lead to key confusion and value overwriting.

Announced
2024-03-03
Revised
2024-03-03
Access
remote
Bugs
#855689
Advisory
https://security.gentoo.org/glsa/202403-03

Affected packages

PackageArchVulnerableUnaffected
dev-python/ujson*< 5.4.0>= 5.4.0

Background

UltraJSON is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 3.8+.

Description

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.

Impact

Please review the referenced CVE identifiers for details.

Workaround

There is no known workaround at this time.

Resolution

All UltraJSON users should upgrade to the latest version:

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-python/ujson-5.4.0"

References