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

Source: https://junglewise.ai/threats/cve-2026-40347-python-multipart-affected-by-denial-of-service-via-large  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-18. Updated: 2026-05-11  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/python-multipart). Vendors: [PyPI](https://junglewise.ai/threats/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

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

- [https://api.github.com/users/HamdaanAliQuatil](https://api.github.com/users/HamdaanAliQuatil)
- [https://github.com/HamdaanAliQuatil](https://github.com/HamdaanAliQuatil)
- [https://api.github.com/users/HamdaanAliQuatil/gists%7B/gist_id%7D](https://api.github.com/users/HamdaanAliQuatil/gists%7B/gist_id%7D)
- [https://api.github.com/users/HamdaanAliQuatil/repos](https://api.github.com/users/HamdaanAliQuatil/repos)
- [https://avatars.githubusercontent.com/u/96776914?v=4](https://avatars.githubusercontent.com/u/96776914?v=4)
- [https://api.github.com/users/HamdaanAliQuatil/events%7B/privacy%7D](https://api.github.com/users/HamdaanAliQuatil/events%7B/privacy%7D)

## Related threats

- [PYSEC-2026-1851 - Denial of service (DoS) via deformation `multipart/form-data` boundary](https://junglewise.ai/threats/cve-2024-53981-denial-of-service-dos-via-deformation-multipart-form-data)
- [PYSEC-2026-1850 - python-multipart vulnerable to Content-Type Header ReDoS](https://junglewise.ai/threats/cve-2024-24762-python-multipart-content-type-header-redos)
- [Kludex Python-Multipart denial of service via negative Content-Length](https://junglewise.ai/threats/cve-2026-53540-kludex-python-multipart-denial-of-service-via-negative-content)
- [Kludex Python-Multipart denial of service in QuerystringParser](https://junglewise.ai/threats/cve-2026-53539-kludex-python-multipart-denial-of-service-in-querystringparser)
- [Kludex Python-Multipart parameter smuggling via semicolon separator](https://junglewise.ai/threats/cve-2026-53538-kludex-python-multipart-parameter-smuggling-via-semicolon)
