Vulnerability · Published Feb 14, 2023 · Assigned by GitHub_M

CVE-2023-25577Werkzeug may allow high resource usage when parsing multipart form data with many fields

High 7.5

In plain English

A high-severity resource allocation without limits in werkzeug from pallets. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.4% (higher than 73% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)1.4%top 27.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-werkzeug2.2.2-3DEBIAN-CVE-2023-25577
Debian:13python-werkzeug2.2.2-3DEBIAN-CVE-2023-25577
Debian:14python-werkzeug2.2.2-3DEBIAN-CVE-2023-25577
PyPIwerkzeug2.2.3GHSA-xg9f-g7g7-2323
PyPIwerkzeug2.2.3PYSEC-2023-58
Ubuntu:22.04:LTSpython-werkzeug2.0.2+dfsg1-1ubuntu0.22.04.1USN-5948-1
Ubuntu:22.04:LTSpython-werkzeug2.0.2+dfsg1-1ubuntu0.22.04.1UBUNTU-CVE-2023-25577

Affected products (as reported)

VendorProductVersions
pallets werkzeug < 2.2.3

Weakness: CWE-770 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References