All reports
Medium

Potential double free of buffer during string decoding

Affected versions

Version ranges need review.

PyPIujson
Affected versions
<5.4.0 || =1.15 || =1.18 || =1.19 || =1.21 || =1.22 || =1.23 || =1.30 || =1.33 || =1.34 || =1.35 || =1.4 || =1.6 || =1.8 || =1.9 || =2.0.0 || =2.0.1 || =2.0.2 || =2.0.3 || =3.0.0 || =3.1.0 || =3.2.0 || =4.0.0 || =4.0.1 || =4.0.2 || =4.1.0 || =4.2.0 || =4.3.0 || =5.0.0 || =5.1.0 || =5.2.0 || =5.3.0
Fixed version
5.4.0
PyPIujson
Affected versions
< 5.4.0
Fixed version
5.4.0
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2022-31117

Probability of exploitation in the next 30 days: 1.88%

FIRST EPSS · 2026-11-23

Description

Impact

What kind of vulnerability is it? Who is impacted?

When an error occurs while reallocating the buffer for string decoding, the buffer gets freed twice.

Due to how UltraJSON uses the internal decoder, this double free is impossible to trigger from Python.

Patches

Has the problem been patched? What versions should users upgrade to?

Users should upgrade to UltraJSON 5.4.0.

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

There is no workaround.

For more information

If you have any questions or comments about this advisory:

Links

Credits

  • JustAnotherArchivist