GHSA-hrfv-mqp8-q5rw

    Dashboard / Vulnerabilities / GHSA-hrfv-mqp8-q5rw

    GHSA-hrfv-mqp8-q5rw

    Published: 25 Oct 2023Last Modified: 10 Sept 2026

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

    Details: 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

    Package

    Name: werkzeug

    Purl: pkg:pypi/werkzeug

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 3.0.0
    Fixed -3.0.1

    Affected versions

    3.0.0

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High