# CVE-2023-46136: werkzeug DoS — Fixed in 3.0.1

🐍

🐍 PyPI

Not in CISA KEV

HIGH severity

# CVE-2023-46136 — werkzeug

HIGH [Fix: pallets/werkzeug@f3c803b](https://github.com/pallets/werkzeug/commit/f3c803b3ade485a45f12b6d6617595350c0f03e2)

CVE-2023-46136 is a high-severity (CVSS 8) Uncontrolled Resource Consumption vulnerability in werkzeug. A fix is available for werkzeug — see the affected versions and patch details below.

Werkzeug vulnerable to high resource usage when parsing multipart/form-data containing a large part with CR/LF character at the beginning

Also known as[GHSA-hrfv-mqp8-q5rw](/vulnerability/GHSA-hrfv-mqp8-q5rw)PYSEC-2023-221

Published

Oct 24, 2023

Updated

Oct 28, 2026

Affected

2 pkgs

Patched

2 / 2

Exploits

None indexed

Exploitation data as of Nov 6, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

1.3%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs70th percentile — riskier than 70% of all scored CVEsHighest risk

0.07%0.64%1.22%1.79%0.6%1.3%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

2 pkgs affected

🐍`werkzeug`🐍`werkzeug`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

## Description

Werkzeug multipart data parser needs to find a boundary that may be between consecutive chunks. That's why parsing is based on looking for newline characters. Unfortunately, code looking for partial boundary in the buffer is written inefficiently, so if we upload 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. The amount of RAM required can trigger an out of memory kill of the process. If many concurrent requests are sent continuously, this can exhaust or kill all available workers.

## Affected Packages

2 total 2 fixed

Ecosystem

Package

Vulnerable range

Fix

🐍PyPI

`werkzeug` 

≥ 3.0.0&&< 3.0.1

3.0.1`pip install --upgrade 'werkzeug==3.0.1'`

🐍PyPI

`werkzeug` 

≥ 2.0.0rc1&&< 2.3.8

2.3.8`pip install --upgrade 'werkzeug==2.3.8'`

## Affected Products

1 product · 2 configurations

Application

`werkzeug`palletsprojects

< 2.3.8

1 version

3.0.0

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for werkzeug, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update werkzeug to 3.0.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-46136 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
    

## Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

The vulnerability found in python-werkzeug, which lets attackers carry out denial of service attacks by using carefully crafted multipart data, is considered a moderate issue because it could affect system resources and availability. When this vulnerability is exploited, it can cause the CPU to work excessively hard…

Product

Fixed in

Advisory

Ironic content for Red Hat OpenShift Container Platform 4.12

`python-werkzeug-0:2.0.3-5.el9`

[RHSA-2023:7610](https://access.redhat.com/errata/RHSA-2023:7610)

Ironic content for Red Hat OpenShift Container Platform 4.13

`python-werkzeug-0:2.0.3-5.el9`

[RHSA-2023:7477](https://access.redhat.com/errata/RHSA-2023:7477)

Red Hat Ceph Storage 8.1

`oath-toolkit-0:2.6.12-1.el9cp`

[RHSA-2025:9775](https://access.redhat.com/errata/RHSA-2025:9775)

Red Hat OpenShift Container Platform 4.14

`python-werkzeug-0:2.2.3-2.el9`

[RHSA-2023:7473](https://access.redhat.com/errata/RHSA-2023:7473)

Red Hat OpenStack Platform 17.1 for RHEL 8

`python-werkzeug-0:2.0.1-8.el8ost`

[RHSA-2024:0189](https://access.redhat.com/errata/RHSA-2024:0189)

Red Hat OpenStack Platform 17.1 for RHEL 9

`python-werkzeug-0:2.0.1-6.el9ost`

[RHSA-2024:0214](https://access.redhat.com/errata/RHSA-2024:0214)

## Frequently Asked Questions

Werkzeug multipart data parser needs to find a boundary that may be between consecutive chunks. That's why parsing is based on looking for newline characters. Unfortunately, code looking for partial boundary in the buffer is written inefficiently, so if we upload 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

O3 Security · Impact-Aware SCA

### Is CVE-2023-46136 in your dependencies?

Find it across PyPI, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)