CVE-2026-44660: UltraJSON memory leak in ujson.dump on write failure

CVE-2026-44660 · Severity: high · CVSS 7.5 · Published 2026-05-27

UltraJSON, a high-speed JSON library for Python, contains a memory leak when writing data to certain types of files or network connections. If a write operation fails (for example, if a user closes a connection while a web server is sending a response), the memory used for that data is not released. An attacker could exploit this by repeatedly triggering failed writes to exhaust the server's memory, potentially causing the application to crash or become unavailable.

Technologies: ujson (PyPI), UltraJSON. Vendors: PyPI, UltraJSON.

Quick answers

Is CVE-2026-44660 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-44660 being exploited in the wild.
How severe is CVE-2026-44660?
High severity, with a CVSS score of 7.5, published 27 May 2026.
Which products and versions are affected?
ujson (PyPI) <= 5.12.0, ECOSYSTEM:introduced=0,fixed=5.12.1; UltraJSON < 5.12.1, <= 5.12.0.
Is there a fix for CVE-2026-44660?
Yes. ujson (PyPI): upgrade to 5.12.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-44660 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-44660?
Check whether you run ujson (PyPI) or UltraJSON at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ujson (PyPI): upgrade to 5.12.1 or later
    pip install "ujson>=5.12.1"

Technical details

A memory leak exists in UltraJSON's `objToJSONFile()` function within `src/ujson/python/objToJSON.c`. The function allocates a Python string object for serialized JSON data but fails to call `Py_DECREF()` if the subsequent `write()` call on the file-like object raises an exception. This results in a leak of the full serialized payload size for every failed write. An attacker can trigger this by inducing write failures, such as closing a network connection mid-response on a server using `ujson.dump()`. The issue is fixed in version 5.12.1. Applications using `ujson.dumps()` are unaffected.

Affected products

  • UltraJSON ujson <= 5.12.0

Identifiers

  • CVE-2026-44660
  • GHSA-c38f-wx89-p2xg
  • PYSEC-2026-2293

Timeline

  • 2026-05-07: disclosed: Initial disclosure on GitHub
  • 2026-05-12: advisory: GitHub Advisory published
  • 2026-05-27: other: NVD published date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.