Skip to main content

python-multipart CVE-2026-53537

| EUVDEUVD-2026-38324 MEDIUM
Improper Input Validation (CWE-20)
2026-06-15 https://github.com/Kludex/python-multipart GHSA-vffw-93wf-4j4q
5.3
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Craft multipart request with conflicting plain and extended parameters
  2. Delivery
    Submit request to target protected by RFC 7578-compliant upstream inspector
  3. Exploit
    Inspector evaluates plain parameter (safe.txt / comment) and allows request
  4. Execution
    python-multipart backend decodes extended parameter (evil.php / role), overriding plain value
  5. Persist
    Application receives attacker-controlled filename or field name
  6. Impact
    If filename used in path construction without sanitization, path traversal or policy bypass achieved

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

Exploitation of the smuggling primitive specifically requires a deployment where an upstream component - WAF, API gateway, load balancer, or reverse proxy - inspects the raw Content-Disposition header and validates field names or filenames, and that upstream component strictly follows RFC 7578 (i.e., does not apply RFC 2231/5987 decoding). Without such an upstream inspector, there is no bypass - the extended parameter is simply decoded and returned to the application directly, with no difference between inspector and backend views. Additionally, for path traversal consequences, the application must construct a filesystem path from UploadFile.filename without calling os.path.basename or stripping encoded sequences such as ..%2F or %00. The File class's use of os.path.basename limits direct file-write exposure. Field name smuggling (name* override) requires an application that gates logic on the multipart field name and has an upstream component validating field names from the raw header. The CVSS vector confirms PR:N and UI:N, meaning no authentication and no victim interaction are required once the preconditions above are met.

Impact

The provided CVSS 3.1 score of 3.7 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N) accurately reflects the constrained real-world risk. Attack complexity is High because successful exploitation requires a specific deployment topology: an upstream body-inspecting component (WAF, API gateway, proxy) that strictly follows RFC 7578 and does not perform RFC 2231/5987 decoding, paired with a python-multipart backend that does. Applications not deployed behind such inspectors are not at risk from the smuggling vector, though they may still receive decoded percent sequences in filenames. The integrity impact is Low in isolation - the attacker influences field name or filename parsing - but this becomes a higher-order risk when the application builds filesystem paths from unsanitized parsed filenames, where path traversal becomes a concrete secondary impact. No EPSS data was provided in the intelligence feed; given the AC:H and the niche deployment precondition, the probability of widespread automated exploitation is expected to be low. The vulnerability is not in CISA KEV and no POC has been identified at time of analysis. The risk is therefore real but targeted: organizations using python-multipart behind filename-validating security controls, or building filesystem paths from UploadFile.filename in FastAPI/Starlette applications, should treat this as a higher priority than the raw CVSS score suggests.

Exploit ScenarioDerived

An attacker targeting an application that enforces an upload policy at the WAF layer - for example, blocking any Content-Disposition header containing filename=evil.php - crafts a multipart request with the header Content-Disposition: form-data; name="upload"; filename="safe.txt"; filename*=utf-8''evil.php. The WAF evaluates only the plain filename parameter and sees safe.txt, permitting the request. The backend python-multipart library applies RFC 2231 decoding, resolves filename* to evil.php, and passes that value to the application as UploadFile.filename. If the application writes the file using the user-supplied filename without sanitization, the malicious extension bypasses the gateway control. No public POC has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 15, 2026

Parameter smuggling in python-multipart below 0.0.30 allows unauthenticated network attackers to present a different field name or filename to an upstream WAF, proxy, or gateway than the value actually delivered to the backend application. The root cause is that parse_options_header delegates to Python's email.message.Message, which silently applies RFC 2231/5987 extended parameter decoding - a behavior explicitly forbidden for multipart/form-data by RFC 7578 §4.2 - causing the extended value to override the plain parameter and bypass inspection logic. Concrete downstream consequences include circumventing filename-based upload controls and, where applications construct filesystem paths from the parsed filename without sanitization, achieving path traversal via decoded percent sequences such as ..%2F or injecting null bytes (%00) to confuse validators. No public exploit has been identified and the vulnerability is not in CISA KEV; CVSS 3.7 with AC:H reflects that exploitation requires a specific upstream inspector in the deployment topology.

RemediationAI

Upgrade python-multipart to version 0.0.30 or later. The fix removes RFC 2231/5987 extended parameter support from Content-Disposition parsing entirely, making the plain name/filename parameter authoritative in conformance with RFC 7578 §4.2. The vendor advisory is at https://github.com/Kludex/python-multipart/security/advisories/GHSA-vffw-93wf-4j4q and the GHSA is GHSA-vffw-93wf-4j4q. For applications that cannot upgrade immediately, the primary compensating control is to sanitize parsed filenames before use: apply os.path.basename on UploadFile.filename (the File class already does this for direct file writes, but custom code handling the filename string may not), and reject or strip any null bytes or encoded traversal sequences before constructing filesystem paths. As a secondary measure, ensure upstream WAF or gateway rules perform allow-list validation on filename extensions after URL-decoding to reduce the window of bypass. Note that neither workaround addresses field name smuggling; only upgrading to 0.0.30 eliminates the root cause.

Affected VersionsENISA

python-multipart < 0.0.30

Affected Packages

pypi python-multipart fix: 0.0.30

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

python-multipart (pkg:pip/python-multipart) is a Python library for parsing multipart/form-data request bodies, widely used as a dependency of Starlette and FastAPI. The vulnerable code path in parse_options_header feeds raw Content-Disposition and Content-Type header values to Python's stdlib email.message.Message class (email.compat32), which transparently applies RFC 2231 and RFC 5987 extended parameter decoding. These RFCs define a charset-aware parameter syntax (e.g., filename*=utf-8''evil.php) intended for MIME email headers, not for multipart/form-data. RFC 7578 §4.2 explicitly prohibits the filename* form in multipart/form-data; the continuation forms filename*0, filename*1, and the name* variant are equally invalid in this context. Because email.message.Message resolves and merges these extended parameters under the bare name/filename key - and gives them precedence over the plain parameter - the library returns a decoded value that differs from what any RFC 7578-compliant parser upstream (WAF, API gateway, reverse proxy) would have read. The NVD CWE assignment is CWE-20 (Improper Input Validation), while the upstream GitHub Security Advisory cites CWE-436 (Interpretation Conflict), which is more precise: the flaw is not simply that input is unvalidated but that two components apply mutually incompatible RFCs to the same header, creating an exploitable semantic gap.

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

NVD PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
vuln.today AI 3.7 LOW

Network vector, no privileges or interaction required; AC:H because exploitation requires a specific upstream RFC 7578-compliant inspector; integrity-only impact via control bypass.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
SUSE 3.7 LOW
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Red Hat 3.7 LOW

Primary rating from NVD.

CVSS VectorNVD

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

Lifecycle Timeline

2
Severity Changed
Jun 26, 2026 - 20:07 NVD
LOW MEDIUM
CVSS changed
Jun 26, 2026 - 20:07 NVD
3.7 (LOW) 5.3 (MEDIUM)

DescriptionNVD

Summary

parse_options_header parsed Content-Disposition (and Content-Type) headers with email.message.Message, which transparently applies RFC 2231/5987 decoding. The extended parameter syntax (filename*=charset'lang'value, name*=..., and the filename*0/filename*1 continuation form) is decoded and surfaced under the bare filename/name key, and overrides the plain parameter when both are present. RFC 7578 §4.2 explicitly forbids the filename* form in multipart/form-data.

Components that follow RFC 7578, or that do not implement RFC 2231/5987 decoding for multipart/form-data (WAFs, proxies, gateways), may interpret such a header differently. An attacker can exploit that difference to smuggle a different field name or filename past an upstream inspector to the backend.

Details

Given both a plain and an extended parameter, the extended value won. For example:

Content-Disposition: form-data; name="comment"; name*=utf-8''role

An inspector following RFC 7578 sees the field comment, while the returned value was name=role. The same applies to filenames:

Content-Disposition: form-data; name="upload"; filename="safe.txt"; filename*=utf-8''evil.php

The inspector sees safe.txt, while the returned value was filename=evil.php. Continuation parameters (filename*0, filename*1, and so on) were likewise reassembled into a filename invisible to a plain filename= match, and percent encoded sequences in the extended value were decoded (so ..%2F, %00, and similar appeared in the returned filename).

This affects the high level parse_options_header, FormParser, create_form_parser, and parse_form APIs, and reaches Starlette/FastAPI through request.form(), where the smuggled value is exposed as the form field name or UploadFile.filename.

Impact

This is an interpretation conflict (CWE-436) with other multipart/form-data parsers. An attacker able to submit multipart/form-data can present a different field name or filename to an upstream body inspecting component than the one delivered to the application. Concrete consequences depend on how the application uses these values, and may include bypassing a field name or filename based access/upload control, or, for an application that builds filesystem paths from the parsed filename without sanitization, path traversal via decoded ..%2F sequences. Decoded control bytes such as %00 can likewise cause confusion between an upstream validator and the backend. The File class applies os.path.basename, so file writing through it is not directly affected.

Mitigation

Upgrade to python-multipart 0.0.30 or later, which ignores RFC 2231/5987 extended parameters (name*, filename*, and their continuations) so the plain name/filename parameter remains authoritative. RFC 7578 §4.2 forbids filename* for multipart/form-data; name* and the continuation forms are dropped for the same reason, since they are not valid multipart/form-data parameters either.

Blast Radius

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

Ecosystem-wide dependent count for version 0.0.30.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Threat Intel
1
1 source
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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: Low
Product Status
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.0 Affected

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