Critical Resource Exhaustion Vulnerability in Werkzeug Package

python-werkzeug Updated 03 Oct 2025

Summary

25/10/2024
N/A
Yes i
High
7.5

UBUNTU-CVE-2024-49767: Werkzeug is a Web Server Gateway Interface web application library. Affects python-werkzeug versions < 2.0.2+dfsg1-1ubuntu0.22.04.3. Fixed in 2.0.2+dfsg1-1ubuntu0.22.04.3. 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

Werkzeug is a comprehensive WSGI (Web Server Gateway Interface) web application library that provides utilities for building web applications in Python. It is widely used in frameworks like Flask for handling HTTP requests and responses. The library is known for its flexibility and ease of use, making it a popular choice among developers. However, a recent vulnerability has been identified that affects its ability to handle multipart form data, potentially leading to severe resource exhaustion.

Vulnerability Detail

The vulnerability arises from the werkzeug.formparser.MultiPartParser component, which is responsible for parsing multipart/form-data requests. Versions of Werkzeug prior to 3.0.6 are susceptible to a denial of service (DoS) attack where a specially crafted form submission can cause the parser to allocate excessive memory—up to 8 times the upload size. This can lead to significant resource exhaustion, potentially crashing the server and affecting availability. The vulnerability has a CVSS score of 7.5, indicating a high severity level.

How To Fix

Minimum fixed version

2.0.2+dfsg1-1ubuntu0.22.04.3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing rate limiting on file uploads or validating file sizes to mitigate the impact of this vulnerability. Additionally, you can monitor your server's memory usage closely to detect any unusual spikes.

Conclusion

The identified vulnerability in the Werkzeug package poses a significant risk due to its potential for resource exhaustion, which can lead to denial of service. It is crucial for developers using affected versions to upgrade to version 3.0.6 or later to ensure the security and stability of their applications. Monitoring tools like Vulert can assist in identifying vulnerabilities in your software without complex setups.

See every vulnerability recorded for python-werkzeug →

Share this vulnerability

FAQ

The vulnerability allows for resource exhaustion through specially crafted multipart form submissions, leading to potential denial of service.

Versions prior to 3.0.6 are affected by this vulnerability.

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

Implement rate limiting on uploads and monitor memory usage to mitigate the effects of the vulnerability until you can upgrade.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for python-werkzeug.

How To Fix

Minimum fixed version

2.0.2+dfsg1-1ubuntu0.22.04.3

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-werkzeug

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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