Low [CVE-2026-53540] Negative Content-Length in parse_form buffers the entire body in memory
This low-severity Red Hat Linux advisory covers CVE-2026-53540 affecting Exploit Intelligence, Migration Toolkit for Applications 8, OpenShift Lightspeed.
Android app · Google Play
Monitor future Red Hat Linux CVEs from your phone.
Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.
Summary
Python-Multipart is a streaming multipart parser for Python. Prior to 0.0.31, parse_form() did not validate the Content-Length header before using it to bound its chunked read of the request body.
A negative Content-Length turned the bounded read into a read-until-EOF, so the entire body was loaded into memory in a single read instead of in fixed-size chunks. The realistic exposure is limited to bespoke WSGI or http.server handlers that forward raw client headers directly into parse_form().
Common frameworks such as Starlette and FastAPI do not call parse_form() directly and are not affected by this specific code path. Red Hat severity: Low — CVSS 3.7 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L).
Weakness: CWE-400. Affected Red Hat products: Exploit Intelligence; Migration Toolkit for Applications 8; OpenShift Lightspeed; Red Hat AI Inference Server; Red Hat Ansible Automation Platform 2; Red Hat Enterprise Linux AI (RHEL AI) 3; Red Hat OpenShift AI (RHOAI); Red Hat OpenShift Virtualization 4; Red Hat Satellite 6.
Red Hat lists OpenShift Lightspeed; Red Hat Hardened Images as not affected. Red Hat does not currently list a fixing RHSA for this CVE.
- < 0.0.31
Official advisory · high-confidence parse· fetched 3 days ago·verify at source
Mitigation checklist
- Upgrade python-multipart to version 0.0.31 or later, which rejects a negative Content-Length with a ValueError before reading the stream. As a workaround, configure the HTTP stack or reverse proxy to reject or normalize negative Content-Length headers before they reach the application layer.
Official advisory · high-confidence parse· fetched 3 days ago·verify at source
Discussion(0)
No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.
Sign in to join the discussion.