CVE-2023-25577 Werkzeug may allow high resource usage when parsing multipart form data with many fields
An attacker can cause denial of service by sending crafted multipart data to endpoints parsing form data, exhausting CPU and memory resources.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-25577?
CVE-2023-25577 is a high-severity denial of service vulnerability in pallets werkzeug, published on 14 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Werkzeug is a comprehensive WSGI web application library. Prior to version 2.2.3, Werkzeug's multipart form data parser will parse an unlimited number of parts, including file parts. Parts can be a small amount of bytes, but each requires CPU time to parse and may use more memory as Python data. If a request can be made to an endpoint that accesses `request.data`, `request.form`, `request.files`, or `request.get_data(parse_form_data=False)`, it can cause unexpectedly high resource usage. This allows an attacker to cause a denial of service by sending crafted multipart data to an endpoint that will parse it. The amount of CPU time required can block worker processes from handling legitimate requests. The amount of RAM required can trigger an out of memory kill of the process. Unlimited file parts can use up memory and file handles. If many concurrent requests are sent continuously, this can exhaust or kill all available workers. Version 2.2.3 contains a patch for this issue.
Weakness: CWE-770
Which versions are affected by CVE-2023-25577?
3 open source packages ship an affected version, including werkzeug and Werkzeug. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
werkzeug PyPI | All versions | 2.2.3 |
werkzeug PyPI | All versions | 2.2.3 |
Werkzeug PyPI | All versions | 2.2.3 |
Linux distribution packages (32)
python-werkzeug Red Hat:openshift_ironic:4.11::el8 | All versions | 0:2.0.3-5.el8 |
python3-werkzeug Red Hat:openshift_ironic:4.11::el8 | All versions | 0:2.0.3-5.el8 |
python-werkzeug Red Hat:openshift_ironic:4.12::el9 | All versions | 0:2.0.3-4.el9 |
python3-werkzeug Red Hat:openshift_ironic:4.12::el9 | All versions | 0:2.0.3-4.el9 |
python-werkzeug Red Hat:openstack:13::el7 | All versions | 0:0.14.1-3.1.el7ost |
python2-werkzeug Red Hat:openstack:13::el7 | All versions | 0:0.14.1-3.1.el7ost |
python2-werkzeug-doc Red Hat:openstack:13::el7 | All versions | 0:0.14.1-3.1.el7ost |
python-werkzeug Red Hat:openstack:16.1::el8 | All versions | 0:0.14.1-12.el8ost |
python3-werkzeug Red Hat:openstack:16.1::el8 | All versions | 0:0.14.1-12.el8ost |
python-werkzeug Red Hat:openstack:16.2::el8 | All versions | 0:0.14.1-12.el8ost |
python3-werkzeug Red Hat:openstack:16.2::el8 | All versions | 0:0.14.1-12.el8ost |
python-Werkzeug SUSE:Enterprise Storage 7 | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Enterprise Storage 7.1 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise Module for Public Cloud 12 | All versions | 0.12.2-10.13.1 |
python-Werkzeug SUSE:Linux Enterprise Real Time 15 SP3 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Manager Proxy 4.2 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug SUSE:Manager Server 4.2 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug openSUSE:Leap 15.4 | All versions | 1.0.1-150300.3.3.1 |
python-Werkzeug-doc openSUSE:Leap 15.4 | All versions | 0.14.1-150100.6.6.1 |
python-Werkzeug openSUSE:Tumbleweed | All versions | 2.2.3-1.1 |
Products include Palletsprojects Werkzeug.
How do I fix CVE-2023-25577?
Upgrade werkzeug to 2.2.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2023-25577 being exploited?
There is no known exploitation of CVE-2023-25577 in the wild and no public exploit code.
Other vulnerabilities in pallets werkzeug
- CVE-2022-29361 Other in n/a
- CVE-2023-46136 Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning
- CVE-2019-14322 Pallets Werkzeug vulnerable to Path Traversal
- CVE-2026-27199 Werkzeug safe_join() allows Windows special device names
- CVE-2026-21860 Werkzeug safe_join() allows Windows special device names with compound extensions
Sources
Also known as AZL-13588, DEBIAN-CVE-2023-25577, GHSA-xg9f-g7g7-2323, PYSEC-2023-58, RHBA-2023:1507, RHBA-2023:1759 and 7 more.