multipart
Affected
- introduced
1.3.0, fixed1.3.1(ecosystem)
Fixed versions
1.3.1
Fix
- Fixed version
1.3.1pip install --upgrade multipart==1.3.1
Advisory
Also known as: CVE-2026-28356, PYSEC-2026-2670
multipart vulnerable to ReDoS in parse_options_header()
Summary
The parse_options_header() function in multipart.py uses a regular expression with an *ambiguous alternation*, which can cause *exponential backtracking (ReDoS)* when parsing maliciously crafted HTTP or multipart segment headers. This can be abused for denial of service (DoS) attacks against web applications using this library to parse request headers or multipart/form-data streams.
Impact
Any WSGI or ASGI application using multipart.parse_form_data() directly or indirectly (e.g. while parsing multipart/form-data streams) is vulnerable. The slow-down is significant enough to block request handling threads for multiple seconds per request.
Affected versions
All versions up to and including 1.3.0 are affected. The issue is fixed in 1.2.2, 1.3.1 and 1.4.0-dev.
High Basis: The source's own band: HIGH
1.3.0, fixed 1.3.1 (ecosystem)1.3.1
1.3.1pip install --upgrade multipart==1.3.10, fixed 1.2.2 (ecosystem)1.2.2
1.2.2pip install --upgrade multipart==1.2.2Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0