Vulnerabilities in pkg:pypi/multipart

PACKAGE
Advisory Identifier: GHSA-p2m9-wcp5-6qw3
Advisory Summary

CVE-2026-28356 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Multipart libraries in the PyPI ecosystem. The issue involves multipart vulnerable to redos in `parse_options_header()`. Remediation is available by upgrading affected packages to version 1.3.1, 1.2.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/multipart

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/multipart. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-p2m9-wcp5-6qw3 CVE-2026-28356 HIGH multipart vulnerable to ReDoS in `parse_options_header()`

CVE-2026-28356 at a Glance

CVE Identifier CVE-2026-28356
GHSA Identifier GHSA-p2m9-wcp5-6qw3
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Multipart
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-28356

To remediate this vulnerability, upgrade all affected Multipart dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

multipart fixed: 1.3.1
pip install multipart>=1.3.1
multipart fixed: 1.2.2
pip install multipart>=1.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show multipart

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-28356, inspect your installed packages using pip:

pip show multipart

Analyze the terminal output to locate any version of Multipart in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), your application is affected.

Note: The pip show multipart command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Multipart, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-28356 Affected Multipart Versions

2 component(s)
Fixed Versions:
1.3.11.2.2
Product / Package Ecosystem Affected Versions Fixed Version
multipart
PyPI
≥ 1.3.0
< 1.3.1
1.3.1
multipart
PyPI
< 1.2.2
1.2.2

References

Frequently Asked Questions

What is CVE-2026-28356?
CVE-2026-28356 is a security vulnerability in Multipart involving multipart vulnerable to ReDoS in `parse_options_header()` under CWE-1333: Inefficient Regular Expression Complexity.
Which Multipart versions are affected?
Affected versions include releases prior to 1.3.1, 1.2.2 across affected packages: multipart.
What version fixes CVE-2026-28356?
Upgrading to 1.3.1, 1.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is multipart affected?
Yes, multipart is affected in releases prior to 1.3.1, 1.2.2. Upgrade your dependency to 1.3.1, 1.2.2 or later.
What is the CVSS score of CVE-2026-28356?
CVE-2026-28356 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-28356?
CVE-2026-28356 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check PyPI dependencies for CVE-2026-28356?
Run the dependency tree command: 'pip show multipart'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p2m9-wcp5-6qw3",
  "modified" : "2026-03-12T18:32:18Z",
  "published" : "2026-03-12T18:32:18Z",
  "aliases" : [ "CVE-2026-28356" ],
  "summary" : "multipart vulnerable to ReDoS in `parse_options_header()`",
  "details" : "## Summary\n\nThe `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.\n\n## Impact\n\nAny 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.\n\n## Affected versions\n\nAll 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`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "multipart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "multipart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/defnull/multipart/security/advisories/GHSA-p2m9-wcp5-6qw3"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-28356"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/defnull/multipart"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-12T18:32:18Z",
    "nvd_published_at" : "2026-03-12T17:16:50Z"
  }
}