# 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.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Feb 2023
- **Updated:** 10 Mar 2025
- **Also known as:** AZL-13588, DEBIAN-CVE-2023-25577, GHSA-xg9f-g7g7-2323, PYSEC-2023-58, RHBA-2023:1507, RHBA-2023:1759, RHSA-2023:1281, ROOT-APP-PYPI-CVE-2023-25577, SUSE-SU-2023:1664-1, SUSE-SU-2023:1693-1, SUSE-SU-2023:1775-1, UBUNTU-CVE-2023-25577, openSUSE-SU-2024:12788-1

## 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 (Allocation of Resources Without Limits or Throttling)

## 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 | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `werkzeug` | PyPI | All versions | 2.2.3 |
| `werkzeug` | PyPI | All versions | 2.2.3 |
| `Werkzeug` | PyPI | All versions | 2.2.3 |
| `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: Palletsprojects Werkzeug.

## How do I fix CVE-2023-25577?

Upgrade werkzeug to 2.2.3 or later.

## 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](https://insights.sbomify.com/CVE-2022-29361/): Other in n/a (critical 9.8)
- [CVE-2023-46136](https://insights.sbomify.com/CVE-2023-46136/): Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning (high 8.0)
- [CVE-2019-14322](https://insights.sbomify.com/CVE-2019-14322/): Pallets Werkzeug vulnerable to Path Traversal (high 7.5)
- [CVE-2026-27199](https://insights.sbomify.com/CVE-2026-27199/): Werkzeug safe_join() allows Windows special device names (medium 6.3)
- [CVE-2026-21860](https://insights.sbomify.com/CVE-2026-21860/): Werkzeug safe_join() allows Windows special device names with compound extensions (medium 6.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-25577 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2023-25577 in the wild and no public exploit code.

Affected packages and fixed versions:
- werkzeug (PyPI): affected all versions; fixed in 2.2.3
- werkzeug (PyPI): affected all versions; fixed in 2.2.3
- Werkzeug (PyPI): affected all versions; fixed in 2.2.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-25577/ (Markdown: https://insights.sbomify.com/CVE-2023-25577/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-25577
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-25577
- OSV: https://osv.dev/vulnerability/CVE-2023-25577

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-25577/
Summaries are generated and may contain mistakes; the official description above is the record.
