Skip to main content
EPSS 0.4%top 64%

Python lsp server: UltraJSON has a Memory Leak in ujson.dump() on Write Failure (CVE-2026-44660)

0
High
Published: 08/13/2026 (08/13/2026, 17:29:47 UTC)
Source: GCVE Database
Product: python-lsp-server

Description

### Summary When `ujson.dump()` writes to a file-like object and the write operation raises an exception, the serialized JSON string object is not decremented, leaking memory. Each failed write operation leaks the full size of the serialized payload. Code that uses `ujson.dumps()` rather than `ujson.dump()` or only JSON load/decode methods is unaffected. ### Details **Vulnerability Location:** - `src/ujson/python/objToJSON.c:913` - `objToJSONFile()` function start - `src/ujson/python/objToJSON.c:931` - Error return on write failure - `src/ujson/python/objToJSON.c:942` - Early return without cleanup **Root Cause:** The `objToJSONFile()` function allocates a Python string object via `ujson_dumps_internal()`, calls the file's `write()` method, and returns early if `write()` raises an exception—but never calls `Py_DECREF(string)` on the early exit path. ### PoC ```python import gc, tracemalloc, ujson class BadFile: def write(self, s): raise RuntimeError("boom") obj = {"x": "A" * 200000} def run(): try: ujson.dump(obj, BadFile()) except RuntimeError: pass run() tracemalloc.start() gc.collect() base = tracemalloc.get_traced_memory()[0] for i in range(5): run() gc.collect() cur = tracemalloc.get_traced_memory()[0] print(i, cur - base) ``` ### Impact Any application that serializes data through `ujson.dump()` to an attacker-influenced file-like object that can fail can be driven into linear memory growth. An attacker can quickly use up all the memory of say a web server that sends JSON responses using `ujson.dump()` by repeatedly making requests then closing the connection mid response. ### Remediation The missing dec-refs were added in 82af1d0ac01d09aa40c887b460d44b9d9f4bccd9. We recommend upgrading to [UltraJSON 5.12.1](https://github.com/ultrajson/ultrajson/releases/tag/5.12.1). ### Workarounds Replacing `ujson.dump(obj, file)` with `file.write(ujson.dumps(obj))` is equivalent (contrary to popular misconception, there are no streaming benefits to using `ujson.dump()`) and will avoid the memory leak.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

Homebrewmore threats →ghsa
python-lsp-server
pkg:brew/python-lsp-server
Affected versions
>=1.6.0 <1.14.0_2

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/13/2026, 15:03:51 UTC

Technical Analysis

CVE-2026-44660 is a moderate severity vulnerability in UltraJSON (ujson) where the ujson.dump() function fails to release memory upon encountering an error while writing to a file-like object. This results in a memory leak that can lead to resource exhaustion and denial of service. The vulnerability specifically affects Red Hat Satellite's Red Hat Lightspeed component, which analyzes system health locally. Deployments using only ujson.dumps() or JSON decoding are not affected. Red Hat has not provided a patch or official fix for this issue as of the advisory date.

Potential Impact

The vulnerability can cause denial of service through resource exhaustion due to a memory leak when ujson.dump() fails to release memory after an error. Systems running Red Hat Satellite with the affected UltraJSON component may experience degraded availability if exploited. There is no impact on confidentiality or integrity. Exploitation requires the ability to influence input to ujson.dump() or the file-like object it writes to.

Mitigation Recommendations

Red Hat currently does not offer a patch or official fix for this vulnerability. Mitigation options are either unavailable or do not meet Red Hat's criteria for ease of use, applicability, or stability. Users should monitor Red Hat advisories for updates and consider limiting exposure to attacker-controlled inputs to ujson.dump().

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Csaf Category
csaf_security_advisory
Csaf Version
2.0
Publisher
Red Hat Product Security
Advisory Id
RHSA-2026:51195
Cve Count
1

Threat ID: 6a757398bf8831d539d91448

Added to database: 08/07/2026, 05:56:40 UTC

Last enriched: 09/13/2026, 15:03:51 UTC

Last updated: 09/21/2026, 22:01:34 UTC

Views: 26

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

External Links

NVD DatabaseMITRE CVEhttps://access.redhat.com/errata/RHSA-2026:51195https://access.redhat.com/documentation/en-us/red_hat_satellite/6.19/html/updating_red_hat_satellite/indexhttps://access.redhat.com/security/cve/CVE-2026-44660https://access.redhat.com/security/updates/classification/https://catalog.redhat.com/software/containers/searchhttps://docs.redhat.com/en/documentation/red_hat_satellite/6.19/html/installing_satellite_server_in_a_connected_network_environment/performing-additional-configuration-on-server_satellite#installing-and-configuring-red-hat-lightspeed-in-satellitehttps://docs.redhat.com/en/documentation/red_hat_satellite/6.19/html/installing_satellite_server_in_a_disconnected_network_environment/performing-additional-configuration#installing-and-configuring-red-hat-lightspeed-in-satelliteCanonical URLhttps://access.redhat.com/errata/RHSA-2026:51347https://access.redhat.com/documentation/en-us/red_hat_satellite/6.18/html/updating_red_hat_satellite/indexhttps://docs.redhat.com/en/documentation/red_hat_satellite/6.18/html/installing_satellite_server_in_a_connected_network_environment/performing-additional-configuration-on-server_satellite#installing-and-configuring-red-hat-lightspeed-in-satellitehttps://docs.redhat.com/en/documentation/red_hat_satellite/6.18/html/installing_satellite_server_in_a_disconnected_network_environment/performing-additional-configuration#installing-and-configuring-red-hat-lightspeed-in-satelliteCanonical URLSUSE ratingsURL of this CSAF noticeSUSE Bug 1270301SUSE CVE CVE-2026-44660 pageReference 18Reference 19Reference 20Reference 21Reference 22Search on Google

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses