CVE-2026-40347: python-multipart affected by Denial of Service via large multipart preamble or epilogue data

CVE-2026-40347 · Severity: medium · CVSS 5.3 · Published 2026-04-18

Python-Multipart is a streaming multipart parser for Python. Versions prior to 0.0.26 have a denial of service vulnerability when parsing crafted `multipart/form-data` requests with large preamble or epilogue sections. Upgrade to version 0.0.26 or later, which skips ahead to the next boundary candidate when processing leading CR/LF data and immediately discards epilogue data after the closing boundary.

Technologies: python-multipart (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-40347 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-40347 being exploited in the wild.
How severe is CVE-2026-40347?
Medium severity, with a CVSS score of 5.3, published 18 April 2026.
Which products and versions are affected?
python-multipart (PyPI) < 0.0.26, ECOSYSTEM:introduced=0,fixed=0.0.26.
Is there a fix for CVE-2026-40347?
Yes. python-multipart (PyPI): upgrade to 0.0.26 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2026-40347?
Check whether you run Fastapiexpert Python-Multipart or python-multipart (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • python-multipart (PyPI): upgrade to 0.0.26 or later
    pip install "python-multipart>=0.0.26"

Affected products

  • Fastapiexpert Python-Multipart
  • python-multipart (PyPI) < 0.0.26, ECOSYSTEM:introduced=0,fixed=0.0.26

Identifiers

  • CVE-2026-40347
  • GHSA-mj87-hwqh-73pj
  • PYSEC-2026-3038

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.