Potential double free of buffer during string decodingGHSA-fm67-cv37-96ff
MEDIUMFix: ultrajson/ultrajson@9c20de0GHSA-fm67-cv37-96ff is a medium-severity (CVSS 5.9) CWE-415 vulnerability in ujson. A fix is available for ujson — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-fm67-cv37-96ff.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
ujsonReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
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:
- Open an issue in UltraJSON
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | ujson | all versions | 5.4.0pip install --upgrade 'ujson==5.4.0' |
Affected Products
fedorafedoraprojectultrajsonultrajson_projectDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ujson, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update ujson to 5.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-fm67-cv37-96ff is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat OpenStack Platform 16.1 | python-ujson-0:2.0.3-3.el8ost | RHSA-2022:8864 |
| Red Hat OpenStack Platform 16.2 | python-ujson-0:2.0.3-3.el8ost | RHSA-2022:8850 |
Frequently Asked Questions
Is GHSA-fm67-cv37-96ff in your dependencies?
Find it across PyPI, including transitive dependencies.