# CVE-2023-46136: Werkzeug DoS: High resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning

> Attackers can cause denial of service in applications using Werkzeug by sending crafted multipart data that consumes excessive CPU resources.

- **Severity:** High 8.0 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 24 Oct 2023
- **Updated:** 20 May 2026
- **Also known as:** ALPINE-CVE-2023-46136, AZL-31701, AZL-35141, CLEANSTART-2026-PT44731, CLEANSTART-2026-TF19359, CLSA-2026-1773360968, CLSA-2026-1773360969, DEBIAN-CVE-2023-46136, ECHO-b9b6-c39c-7946, GHSA-hrfv-mqp8-q5rw, MINI-66xx-vx53-hxwv, MINI-6mcg-6ffr-jqmp, OESA-2025-1996, OESA-2025-1999, OESA-2025-2000, PYSEC-2023-221, RHSA-2023:7477, RHSA-2024:0189, RHSA-2024:0214, ROOT-APP-PYPI-CVE-2023-46136, SUSE-SU-2023:4288-1, openSUSE-SU-2024:13375-1

## What is CVE-2023-46136?

CVE-2023-46136 is a high-severity denial of service vulnerability in pallets werkzeug, published on 24 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Werkzeug is a comprehensive WSGI web application library. In versions on the 3.x branch prior to 3.0.1 and on the 2.x branch prior to 2.3.8, if an upload of a file that starts with CR or LF and then is followed by megabytes of data without these characters: all of these bytes are appended chunk by chunk into internal bytearray and lookup for boundary is performed on growing buffer. 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. This vulnerability has been patched in version 3.0.1 and 2.3.8.

Weakness: CWE-787 (Out-of-bounds Write), CWE-407 (Inefficient Algorithmic Complexity), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2023-46136?

5 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.3.8, 3.0.1 |
| `werkzeug` | PyPI | From 2.0.0rc1 | 2.3.8 |
| `werkzeug` | PyPI | From 3.0.0 | 3.0.1 |
| `Werkzeug` | PyPI | From 2.0.0rc1 | 2.3.8 |
| `Werkzeug` | PyPI | From 3.0.0 | 3.0.1 |
| `python-werkzeug` | Red Hat:openshift_ironic:4.13::el9 | All versions | 0:2.0.3-5.el9 |
| `python3-werkzeug` | Red Hat:openshift_ironic:4.13::el9 | All versions | 0:2.0.3-5.el9 |
| `python-werkzeug` | Red Hat:openstack:17.1::el8 | All versions | 0:2.0.1-8.el8ost |
| `python3-werkzeug` | Red Hat:openstack:17.1::el8 | All versions | 0:2.0.1-8.el8ost |
| `python-werkzeug` | Red Hat:openstack:17.1::el9 | All versions | 0:2.0.1-6.el9ost |
| `python3-werkzeug` | Red Hat:openstack:17.1::el9 | All versions | 0:2.0.1-6.el9ost |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Python 3 15 SP4 | All versions | 2.3.6-150400.6.6.1 |
| `python-Werkzeug` | SUSE:Linux Enterprise Module for Python 3 15 SP5 | All versions | 2.3.6-150400.6.6.1 |
| `python-Werkzeug` | openSUSE:Leap 15.4 | All versions | 2.3.6-150400.6.6.1 |
| `python-Werkzeug` | openSUSE:Leap 15.5 | All versions | 2.3.6-150400.6.6.1 |
| `python-Werkzeug` | openSUSE:Tumbleweed | All versions | 3.0.1-1.1 |

Products: Palletsprojects Werkzeug.

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

Upgrade werkzeug to a fixed version for your release line: 2.3.8 or 3.0.1.

## Is CVE-2023-46136 being exploited?

There is no known exploitation of CVE-2023-46136 in the wild and no public exploit code.

Public exploit code:

- Exploit for Werkzeug < 3.1.4 (CVE-2023-46136) (github_poc): https://github.com/JawadPy/WerkGhost

## Other vulnerabilities in pallets werkzeug

- [CVE-2022-29361](https://insights.sbomify.com/CVE-2022-29361/): Other in n/a (critical 9.8)
- [CVE-2023-25577](https://insights.sbomify.com/CVE-2023-25577/): Werkzeug may allow high resource usage when parsing multipart form data with many fields (high 7.5)
- [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-46136 and fix it if it is affected.

What it is: CVE-2023-46136 is a high-severity denial of service vulnerability in pallets werkzeug, published on 24 Oct 2023. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-46136 in the wild and no public exploit code.

Affected packages and fixed versions:
- werkzeug (PyPI): affected all versions; fixed in 2.3.8, 3.0.1
- werkzeug (PyPI): affected from 2.0.0rc1; fixed in 2.3.8
- werkzeug (PyPI): affected from 3.0.0; fixed in 3.0.1
- Werkzeug (PyPI): affected from 2.0.0rc1; fixed in 2.3.8
- Werkzeug (PyPI): affected from 3.0.0; fixed in 3.0.1

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-46136/ (Markdown: https://insights.sbomify.com/CVE-2023-46136/index.md)
```

## Sources

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

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