Skip to main content

python-multipart CVE-2026-42561

HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-05-06 https://github.com/Kludex/python-multipart GHSA-pp6c-gr5w-3c5g
7.5
CVSS 3.1 · Vendor: https://github.com/Kludex/python-multipart
Share

Severity by source

Vendor (https://github.com/Kludex/python-multipart) PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
SUSE
HIGH
qualitative

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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Lifecycle Timeline

3
Source Code Evidence Fetched
May 06, 2026 - 22:38 vuln.today
Analysis Generated
May 06, 2026 - 22:38 vuln.today
CVE Published
May 06, 2026 - 21:56 nvd
HIGH 7.5

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Vendor 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

Share

CVE-2026-42561 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy