Denial of Service Vulnerability in python-multipart Package

python-multipart Updated 03 Oct 2025

Summary

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

UBUNTU-CVE-2024-53981: python-multipart is a streaming multipart parser for Python. Affects python-multipart versions 0.0.5-2. 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

The python-multipart package is a streaming multipart parser for Python, widely used for handling form data in web applications. It efficiently processes multipart requests, allowing developers to manage file uploads and other data submissions seamlessly. However, its design can lead to vulnerabilities if not properly managed, particularly in scenarios involving large data inputs.

Vulnerability Detail

The vulnerability identified as CVE-2024-53981 arises from the way python-multipart handles line breaks and trailing bytes during the parsing of form data. Specifically, it skips line breaks before the first boundary and any trailing bytes after the last boundary, processing one byte at a time. This behavior can lead to excessive logging when an attacker sends a malicious request with large amounts of data before or after the boundaries. The result is a significant CPU load and potential stalling of the processing thread, which can disrupt the event loop in ASGI applications, leading to a denial of service (DoS) condition. 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

As a temporary workaround, you can limit the size of incoming requests to your application to prevent excessive resource consumption. This can be done by configuring your web server or application framework to reject requests that exceed a certain size threshold.

Conclusion

The python-multipart package has a critical vulnerability that can lead to denial of service if not addressed. It is essential to update to the patched version 0.0.18 to ensure the security and stability of your applications. Implementing request size limits can serve as a temporary measure while updates are being made.

See every vulnerability recorded for python-multipart →

Share this vulnerability

FAQ

CVE-2024-53981 is a vulnerability in the python-multipart package that can lead to denial of service due to excessive CPU load from maliciously crafted requests.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The vulnerability has a CVSS score of 7.5, indicating a high severity level that could impact application performance.

If an immediate update is not possible, consider implementing request size limits as a temporary workaround to mitigate the risk.

For more information on open-source vulnerabilities, you can visit Vulert at https://vulert.com, which monitors and alerts for vulnerabilities using manifest files.

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