Description
multipart is a fast multipart/form-data parser for python. Prior to 1.2.2, 1.3.1 and 1.4.0-dev, 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. The issue is fixed in 1.2.2, 1.3.1 and 1.4.0-dev.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| defnull | multipart | >= 1.3.0, < 1.3.1, < 1.2.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | multipart | 1.3.1-1 | — |
| Debian 13 | multipart | 1.2.1-2+deb13u1 | DSA-6161-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.04 LTS | multipart | 1.3.0-3ubuntu0.1 | — |
| Ubuntu 25.10 | multipart | 1.2.1-2+deb13u1build0.25.10.1 | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-multipart | 1.3.1-1.1 | openSUSE-SU-2026:10333-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | multipart | >= 1.3.0, < 1.3.1 | 1.3.1 | GHSA-p2m9-wcp5-6qw3 |
| PyPI | multipart | < 1.2.2 | 1.2.2 | GHSA-p2m9-wcp5-6qw3 |
| PyPI | multipart | < 1.2.2 · >= 1.3.0, < 1.3.1 | 1.2.2, 1.3.1 | PYSEC-2026-2670 |
Advisories 2
- DSA-6161-1 multipart - security update Debian Security (DSA / DLA) · Mar 23, 2026
- openSUSE-SU-2026:10333-1 python311-multipart-1.3.1-1.1 on GA media SUSE / openSUSE Security Updates · Mar 14, 2026