MediumGHSA-mj87-hwqh-73pjCVE-2026-40347PYSEC-2026-3038

python-multipart affected by Denial of Service via large multipart preamble or epilogue data

Published 15 Apr 2026 · Updated 10 Sept 2026

Is your project on an affected python-multipart?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<0.0.26
Fixed in
0.0.26
Update to the fixed version for your release line, for example:pip install 'python-multipart>=0.0.26'

Details

Summary

A denial of service vulnerability exists when parsing crafted multipart/form-data requests with large preamble or epilogue sections.

Details

Two inefficient multipart parsing paths could be abused with attacker-controlled input.

Before the first multipart boundary, the parser handled leading CR and LF bytes inefficiently while searching for the start of the first part. After the closing boundary, the parser continued processing trailing epilogue data instead of discarding it immediately. As a result, parsing time could grow with the size of crafted data placed before the first boundary or after the closing boundary.

Impact

An attacker can send oversized malformed multipart bodies that consume excessive CPU time during request parsing, reducing request-handling capacity and delaying legitimate requests. This issue degrades availability but does not typically result in a complete denial of service for the entire application.

Mitigation

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.

Is GHSA-mj87-hwqh-73pj in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected python-multipart, and gives you the command that fixes it.

More advisories for python-multipart

  • HighCVE-2026-53539python-multipart: Quadratic-time querystring parsing with semicolon separators causes CPU denial of service · 15 Jun 2026
  • LowCVE-2026-53540python-multipart: Negative Content-Length in parse_form buffers the entire body in memory · 15 Jun 2026
  • LowCVE-2026-53538python-multipart: Semicolon treated as querystring field separator enables parameter smuggling · 15 Jun 2026
  • LowCVE-2026-53537python-multipart: Content-Disposition parameter smuggling via RFC 2231/5987 extended parameters · 15 Jun 2026
  • HighCVE-2026-42561python-multipart has Denial of Service via unbounded multipart part headers · 6 May 2026
  • HighCVE-2026-24486Python-Multipart has Arbitrary File Write via Non-Default Configuration · 26 Jan 2026
All 9 advisories for python-multipart

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.