CVE-2024-49767
JSON

6.9medium

Werkzeug possible resource exhaustion when parsing file data in forms

Severity
6.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
1.09% (higher than 66% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-q34m-jh98-gwm2PYSEC-2026-1860PYSEC-2026-3417

Description

Werkzeug is a Web Server Gateway Interface web application library. Applications using `werkzeug.formparser.MultiPartParser` corresponding to a version of Werkzeug prior to 3.0.6 to parse `multipart/form-data` requests (e.g. all flask applications) are vulnerable to a relatively simple but effective resource exhaustion (denial of service) attack. A specifically crafted form submission request can cause the parser to allocate and block 3 to 8 times the upload size in main memory. There is no upper limit; a single upload at 1 Gbit/s can exhaust 32 GB of RAM in less than 60 seconds. Werkzeug version 3.0.6 fixes this issue.

Affected

Product or packageVersionsReported by
pallets werkzeug>= 2.0.0rc1, < 3.0.6CVE List
pallets Quart< 0.20.0CVE List
palletsprojects werkzeugbefore 3.0.6CVE List, NVD
werkzeug (PyPI)from 2.0.0rc1 before 3.0.6GitHub Advisory Database, PyPA Advisory Database
quart (PyPI)before 0.20.0GitHub Advisory Database, PyPA Advisory Database
palletsprojects quartbefore 0.19.7NVD

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
GitHub7.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
PyPA Advisory Database7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Classification

CWE-400CWE-770

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

Werkzeug is a Web Server Gateway Interface web application library. Applications using `werkzeug.formparser.MultiPartParser` corresponding to a version of Werkzeug prior to 3.0.6 to parse `multipart/form-data` requests (e.g. all flask applications) are vulnerable to a relatively simple but effective resource exhaustion (denial of service) attack. A specifically crafted form submission request can cause the parser to allocate and block 3 to 8 times the upload size in main memory. There is no upper limit; a single upload at 1 Gbit/s can exhaust 32 GB of RAM in less than 60 seconds. Werkzeug version 3.0.6 fixes this issue.

GitHub Advisory Database

Applications using Werkzeug to parse multipart/form-data requests are vulnerable to resource exhaustion. A specially crafted form body can bypass the Request.max_form_memory_size setting.

The Request.max_content_length setting, as well as resource limits provided by deployment software and platforms, are also available to limit the resources used during a request. This vulnerability does not affect those settings. All three types of limits should be considered and set appropriately when deploying an application.

NVD (es)

Werkzeug es una librería de aplicaciones web de interfaz de puerta de enlace de servidor web. Las aplicaciones que utilizan `werkzeug.formparser.MultiPartParser` correspondiente a una versión de Werkzeug anterior a la 3.0.6 para analizar solicitudes `multipart/form-data` (por ejemplo, todas las aplicaciones Flask) son vulnerables a un ataque de agotamiento de recursos (denegación de servicio) relativamente simple pero efectivo. Una solicitud de envío de formulario manipulada específicamente puede hacer que el analizador asigne y bloquee de 3 a 8 veces el tamaño de carga en la memoria principal. No hay un límite superior; una sola carga a 1 Gbit/s puede agotar 32 GB de RAM en menos de 60 segundos. La versión 3.0.6 de Werkzeug corrige este problema.

References

https://github.com/pallets/werkzeug/security/advisories/GHSA-q34m-jh98-gwm2vendor-advisory, web
https://github.com/pallets/quart/commit/5e78c4169b8eb66b91ead3e62d44721b9e1644eepatch, web
https://github.com/pallets/quart/commit/abb04a512496206de279225340ed022852fbf51fweb
https://github.com/pallets/werkzeug/commit/50cfeebcb0727e18cc52ffbeb125f4a66551179bpatch, web
https://github.com/pallets/werkzeug/releases/tag/3.0.6release-notes, web
https://security.netapp.com/advisory/ntap-20250103-0007/
https://nvd.nist.gov/vuln/detail/CVE-2024-49767advisory
https://github.com/pallets/werkzeug/commit/cbb446fdcada7685fce936ded01b76c08dbd6eb5web
https://github.com/pallets/werkzeugpackage
https://security.netapp.com/advisory/ntap-20250103-0007web
https://pypi.org/project/quartpackage
https://github.com/advisories/GHSA-q34m-jh98-gwm2advisory

Sources

SourceRecordLicence
CVE ListCVE-2024-49767 changed 2026-05-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-q34m-jh98-gwm2 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-49767 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1860 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-3417 changed 2026-07-13CC-BY-4.0