<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Ujson (&lt;= 5.12.0) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/ujson--5.12.0/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 12 May 2026 22:28:04 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/ujson--5.12.0/feed.xml" rel="self" type="application/rss+xml"/><item><title>UltraJSON Memory Leak in ujson.dump() on Write Failure (CVE-2026-44660)</title><link>https://feed.craftedsignal.io/briefs/2026-05-ultrajson-memory-leak/</link><pubDate>Tue, 12 May 2026 22:28:04 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-ultrajson-memory-leak/</guid><description>A memory leak vulnerability exists in UltraJSON's `ujson.dump()` function; when writing to a file-like object, if the write operation raises an exception, the serialized JSON string object is not properly de-referenced, leading to a memory leak (CVE-2026-44660).</description><content:encoded><![CDATA[<p>A memory leak vulnerability exists in UltraJSON&rsquo;s <code>ujson.dump()</code> function (CVE-2026-44660). When <code>ujson.dump()</code> writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not de-referenced, leaking memory. This means that each failed write operation leaks the full size of the serialized payload. This issue affects applications that use <code>ujson.dump()</code> to serialize data to potentially unreliable file-like objects. Applications using <code>ujson.dumps()</code> or only JSON load/decode methods are not affected. The vulnerability was patched in UltraJSON version 5.12.1. An attacker can exploit this vulnerability to cause a denial-of-service by exhausting the available memory.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies an application that uses <code>ujson.dump()</code> to serialize data to a file-like object.</li>
<li>The attacker crafts a malicious input that, when processed by the application, triggers the <code>ujson.dump()</code> function.</li>
<li>The application calls <code>ujson_dumps_internal()</code> to serialize the data, allocating a Python string object.</li>
<li>The application attempts to write the serialized data to a file-like object using the file&rsquo;s <code>write()</code> method.</li>
<li>The attacker manipulates the file-like object to raise an exception during the <code>write()</code> operation.</li>
<li>The <code>write()</code> method fails, raising an exception that is caught by the application.</li>
<li>The <code>objToJSONFile()</code> function returns early due to the exception, without calling <code>Py_DECREF(string)</code> to de-reference the allocated string object.</li>
<li>The leaked memory accumulates with each failed write attempt, eventually exhausting the application&rsquo;s memory and causing a denial-of-service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to a denial-of-service condition, where the application becomes unresponsive due to memory exhaustion. In a web server context, an attacker can repeatedly make requests and close the connection mid-response to trigger the memory leak. This can quickly consume all available memory, causing the server to crash or become unavailable to legitimate users. This vulnerability can impact any application that uses <code>ujson.dump()</code> and handles attacker-influenced file-like objects.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to UltraJSON version 5.12.1 or later to remediate the memory leak (see Remediation).</li>
<li>Replace <code>ujson.dump(obj, file)</code> with <code>file.write(ujson.dumps(obj))</code> as a workaround to avoid the memory leak (see Workarounds).</li>
<li>Enable process memory monitoring to detect processes with unusual memory growth patterns, which may indicate exploitation attempts.</li>
<li>Deploy the Sigma rule <code>Detect UltraJSON ujson.dump Memory Leak</code> to identify potential exploitation attempts by monitoring for write operations to file-like objects.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>memory leak</category><category>denial of service</category><category>python</category><category>ujson</category><category>CVE-2026-44660</category></item></channel></rss>