Advisory

PYSEC-2026-1056

Also known as: CVE-2022-31117, GHSA-fm67-cv37-96ff

Summary

Potential double free of buffer during string decoding

Details

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:

Severity

Medium Basis: CVSS v3 score 5.9, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Dates

Published
2026-07-06 08:03 UTC
Modified
2026-07-07 11:46 UTC

Affected packages and fixes

ujson

PyPI · All systems

Affected

  • introduced 0, fixed 5.4.0 (ecosystem)

Fixed versions

5.4.0

Fix

  • Fixed version 5.4.0
    pip install --upgrade ujson==5.4.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences