Skip to main content
← All vulnerabilities
CVE-2024-24762GHSA-QF9M-VFGH-M389GHSA-2JV5-9R88-3W3PPYSEC-2024-38PYSEC-2026-1850

python-multipart vulnerable to content-type header Regular expression Denial of Service

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.0.7, 0.109.1, 0.36.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

`python-multipart` is a streaming multipart parser for Python. When using form data, `python-multipart` uses a Regular Expression to parse the HTTP `Content-Type` header, including options. An attacker could send a custom-made `Content-Type` option that is very difficult for the RegEx to process, consuming CPU resources and stalling indefinitely (minutes or more) while holding the main event loop. This means that process can't handle any more requests, leading to regular expression denial of service. This vulnerability has been patched in version 0.0.7.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • python-multipart

    fixed in 0.0.7

  • fastapi

    fixed in 0.109.1

  • startlette

    fixed in 0.36.2

  • fastapiPyPI

    fixed in 0.109.1

  • python-multipartPyPI

    fixed in 0.0.7

References 8

GitHub · Kludex/python-multipart

GitHub · tiangolo/fastapi

GitHub · encode/starlette

GitHub · andrew-d/python-multipart