GitHub Advisoryadvisory · PyPI

GHSA-p2m9-wcp5-6qw3 multipart vulnerable to ReDoS in `parse_options_header()`

HIGH Published 2026-03-12 Modified 2026-03-12 Official page ↗
Aliases
CVE-2026-28356
Ecosystem
PyPI
Packages
multipart
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-1333
Reviewed
2026-03-12

Affected packages

• PyPI multipart: >= 1.3.0, < 1.3.1 → fixed in 1.3.1 • PyPI multipart: < 1.2.2 → fixed in 1.2.2

Description

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`.

Related

Alias · CVE (1)

  • CVE-2026-28356 multipart is a fast multipart/form-data parser for python. vulnerability

Weakness · CWE (1)

  • CWE-1333 Inefficient Regular Expression Complexity weakness

References