python-multipart
CVE-2026-42561
HIGH
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Primary rating from Vendor (https://github.com/Kludex/python-multipart).
CVSS VectorVendor: https://github.com/Kludex/python-multipart
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Lifecycle Timeline
3Blast Radius
ecosystem impact- 34 pypi packages depend on python-multipart (27 direct, 7 indirect)
Ecosystem-wide dependent count for version 0.0.27.
DescriptionCVE.org
Summary
python-multipart has a denial of service vulnerability in multipart part header parsing. When parsing multipart/form-data, MultipartParser previously had no limit on the number of part headers or the size of an individual part header. An attacker could send a request with either many repeated headers without terminating the header block or a single very large header value, causing excessive CPU work before request rejection or completion.
Impact
Applications that parse attacker-controlled multipart/form-data with affected versions of python-multipart can experience CPU exhaustion. ASGI applications using Starlette, FastAPI, or other frameworks that invoke python-multipart may have worker or event-loop delays while processing malicious upload requests.
Details
The affected parser states are HEADER_FIELD_START, HEADER_FIELD, HEADER_VALUE_START, HEADER_VALUE, and HEADER_VALUE_ALMOST_DONE. The issue can be triggered by:
- A multipart part with an oversized individual header value.
- A multipart part with many repeated header lines or an unterminated header block.
Both variants are addressed by enforcing default parser limits for maximum header count and maximum header size.
Mitigation
Upgrade to python-multipart 0.0.27 or later.
If upgrading is not immediately possible, reduce exposure by enforcing request body size limits at the server, proxy, or framework layer. This is only a mitigation; affected versions of python-multipart still parse multipart part headers without the default header count and header size limits.
AnalysisAI
CPU exhaustion in python-multipart allows remote unauthenticated attackers to cause denial of service through crafted multipart/form-data requests with unbounded header blocks. Applications using Starlette, FastAPI, or other ASGI frameworks that parse attacker-controlled file uploads are vulnerable to worker thread starvation and event-loop blocking. Vendor-released patch available in version 0.0.27, which enforces default limits on both header count and individual header size during multipart parsing.
Technical ContextAI
The python-multipart library (pkg:pip/python-multipart) implements RFC 7578 multipart/form-data parsing for Python web applications, commonly used through ASGI frameworks like Starlette and FastAPI. The vulnerability exists in the MultipartParser state machine, specifically in the HEADER_FIELD_START, HEADER_FIELD, HEADER_VALUE_START, HEADER_VALUE, and HEADER_VALUE_ALMOST_DONE parser states. Prior to version 0.0.27, no bounds checking occurred during part header parsing, allowing attackers to exploit CWE-770 (Allocation of Resources Without Limits or Throttling) by sending either extremely large individual header values or an excessive number of header lines without proper termination. The parser would continue consuming CPU cycles attempting to process these malformed headers until either memory exhaustion or external timeout mechanisms triggered, blocking worker threads or event loops in asynchronous applications.
RemediationAI
Upgrade python-multipart to version 0.0.27 or later, which introduces default enforcement of maximum header count and maximum header size limits during multipart parsing. For Python environments using pip, execute 'pip install --upgrade python-multipart>=0.0.27' and verify the installation with 'pip show python-multipart'. If frameworks like FastAPI or Starlette are pinning python-multipart versions in requirements.txt or pyproject.toml, update those constraints accordingly. The fix is non-breaking and requires no code changes in consuming applications. For environments where immediate upgrade is not feasible, implement compensating controls at the infrastructure layer: configure reverse proxies (nginx, Apache, HAProxy) or cloud load balancers to enforce strict request body size limits (e.g., client_max_body_size in nginx), set WAF rules to reject requests with abnormally large header blocks, and enable rate limiting on upload endpoints to prevent resource exhaustion from repeated attacks. Note these mitigations only reduce attack surface and do not eliminate the vulnerability-affected parser versions will still attempt unbounded header processing within the constrained body size. Review application logs for signs of exploitation, such as slow request processing times on multipart endpoints or worker timeout errors. GitHub security advisory available at https://github.com/Kludex/python-multipart/security/advisories/GHSA-pp6c-gr5w-3c5g.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same technique Denial Of Service
View allVendor StatusVendor
SUSE
Severity: High| Product | Status |
|---|---|
| openSUSE Tumbleweed | Fixed |
| SUSE Linux Enterprise Server 16.0 | Fixed |
| SUSE Linux Enterprise Server 16.1 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.0 | Fixed |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Fixed |
| openSUSE Leap 15.6 | Fixed |
Share
External POC / Exploit Code
Leaving vuln.today
GHSA-pp6c-gr5w-3c5g