Regular Expression Denial of Service in python-multipart - CVE-2024-24762

python-multipart Updated 02 Oct 2025

Summary

05/02/2024
N/A
No i
High
7.5

CVE-2024-24762: python-multipart is a streaming multipart parser for Python. Affects python-multipart across 5 version ranges.

< 9d34ad0ee8a0dfbbcce06f76c2d5d851085024fc < 13e5c26a27f4903924624736abd6131b2da80cc5 < 20f0ef6b4e4caf7d69a667c54dff57fe467109a4 < 7633d1571cc0c2792b766f67172edb9427c66899 < c83e6da1a3a6ed002ebb22138baa1664134d540c

No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

python-multipart is a streaming multipart parser for Python, designed to handle multipart form data efficiently. It is widely used in web applications to process file uploads and form submissions. The package's ability to parse HTTP Content-Type headers is crucial for its functionality, but it also makes it susceptible to certain types of attacks, particularly those involving malformed input.

Vulnerability Detail

The vulnerability identified as CVE-2024-24762 arises from the way python-multipart processes the HTTP Content-Type header using a Regular Expression. An attacker can exploit this by sending a specially crafted Content-Type option that is complex enough to cause excessive CPU consumption. This can lead to a denial of service, as the main event loop may stall for an extended period, preventing the application from handling additional requests. The vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing input validation to restrict the types of Content-Type headers your application accepts. This can help mitigate the risk of denial of service attacks while you work on updating the package.

Conclusion

CVE-2024-24762 is a significant vulnerability in the python-multipart package that can lead to denial of service through the exploitation of Regular Expressions used for parsing HTTP headers. It is crucial to update to the patched version to ensure the security and reliability of your applications.

See every vulnerability recorded for python-multipart →

Share this vulnerability

FAQ

CVE-2024-24762 is a vulnerability in the python-multipart package that allows attackers to exploit the Regular Expression used for parsing HTTP Content-Type headers, potentially leading to a denial of service.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By checking your application's manifest file, such as package-lock.json, you can determine if you are affected by this vulnerability.

The primary impact is denial of service, where the application may become unresponsive due to excessive CPU usage caused by the vulnerability, preventing it from handling requests.

Yes, the vulnerability has been patched in version 0.0.7 of python-multipart. It is recommended to upgrade to this version or later to mitigate the risk.

If you cannot upgrade immediately, consider implementing input validation to limit the types of Content-Type headers accepted by your application as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python-multipart.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback