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
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify multipart upload endpoint
  2. Delivery
    Craft malformed multipart request with unbounded headers
  3. Exploit
    Send HTTP POST to target
  4. Execution
    Trigger unbounded parser loop
  5. Persist
    Exhaust worker CPU and block event loop
  6. Impact
    Deny service to legitimate users

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource allocation limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application accepts multipart/form-data requests from attacker-controlled sources, specifically any endpoint invoking python-multipart's MultipartParser on untrusted input. This includes file upload forms, API endpoints with multipart content-type handlers, and webhook receivers processing form submissions. The vulnerability is exploitable against default configurations of affected python-multipart versions (<0.0.27) with no special feature enablement required. Attack success is NOT limited by authentication mechanisms-unauthenticated public endpoints are vulnerable, but so are authenticated endpoints if the attacker has valid credentials. Attack effectiveness is reduced (but not eliminated) by external request size limits at reverse proxy or framework layers, though these controls do not prevent CPU exhaustion within the allowed payload size. Asynchronous ASGI applications (Starlette, FastAPI) are more severely impacted than synchronous WSGI applications due to event-loop blocking amplifying the denial of service effect across multiple concurrent requests.

Impact

CVSS 7.5 (AV:N/AC:L/PR:N/UI:N) indicates high-severity remote unauthenticated denial of service with low attack complexity. However, real-world risk varies significantly by deployment context. Applications accepting file uploads from untrusted sources (public-facing forms, API endpoints) face immediate risk of service disruption. The attack is trivially automatable and requires no authentication, making it suitable for both targeted attacks and opportunistic scanning. No EPSS score or CISA KEV data provided, suggesting exploitation is not yet widespread, though publicly available exploit code exists via GitHub advisory GHSA-pp6c-gr5w-3c5g with technical details sufficient for weaponization. The impact is strictly availability (A:H with C:N/I:N), meaning data confidentiality and integrity remain intact. Organizations with request size limits at reverse proxy or WAF layers have partial mitigation, but these controls do not address the core parsing inefficiency. Priority should be HIGH for internet-facing Python web applications using FastAPI/Starlette, MEDIUM for internal applications with upload functionality, and LOW for applications that do not parse multipart/form-data.

Exploit ScenarioDerived

An attacker identifies a public API endpoint that accepts file uploads via multipart/form-data, such as a profile picture upload or document submission form running on FastAPI. They craft an HTTP POST request containing a multipart part with thousands of repeated 'Content-Disposition' headers or a single header with a multi-megabyte value. Upon receiving this request, the python-multipart parser enters an infinite-like loop attempting to process the unbounded header block, consuming 100% CPU on the worker thread. In ASGI deployments, this blocks the event loop, preventing the worker from handling any other requests until the malicious request times out or memory exhaustion occurs. Repeating this attack with multiple concurrent connections exhausts all available workers, causing complete service unavailability for legitimate users.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 06, 2026

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.

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.

Affected Packages

pypi python-multipart fix: 0.0.27

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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
Red Hat 7.5 HIGH

Primary rating from Vendor (https://github.com/Kludex/python-multipart).

CVSS VectorVendor: https://github.com/Kludex/python-multipart

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 31 pypi packages depend on python-multipart (29 direct, 2 indirect)

Ecosystem-wide dependent count for version 0.0.27.

Executive ViewAI

Why It Matters

CVE-2026-42561 is a denial-of-service vulnerability in python-multipart that allows unauthenticated attackers to exhaust CPU resources and freeze application workers through malicious file upload requests, directly impacting availability of FastAPI, Starlette, and ASGI-based services. Organizations running these frameworks with user-facing file upload functionality face immediate risk of service disruption affecting customer-facing operations.

Business Impact: High
Compensating Controls

Vendor-released patch: python-multipart version 0.0.27. If immediate patching is not possible: (1) Implement reverse proxy rate limiting on file upload endpoints (e.g., nginx, AWS WAF) to cap multipart requests per source IP; (2) Configure framework-level timeout enforcement to fail requests exceeding 30-second processing time; (3) Restrict file upload access to authenticated users only where operationally feasible; (4) Temporarily disable public file upload endpoints pending patch deployment.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Affected Products (CPE)CVE.org

pkg:pip/python-multipart

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-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-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-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

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

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

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