pypi package report

Is python-multipart safe?

9 known vulnerabilities, worst severity HIGH.

// reach

1 direct dependencies

none carry a known advisory

    167 packages depend on it

    an advisory here reaches each of them

    Create a free accountfor every dependency path, dependent and what to upgrade
    // ai models

    1 published models carry an advisory from this package

    0 pin a version the advisory is confirmed against; the rest declare it without a version.

    Viggle/MeridianHIGHnot pinned

    1 published models

    1 declared · 0 observed · 0 inferred

    ModelEvidence
    Viggle/Meridiandeclared

    1 published AI models are associated with this package: 1 name it in a requirements or pyproject file, 0 load it or import it directly, and 0 are inferred from the runtime stack their declared library pulls in. Only 0 state a version requirement, so this is not a count of affected models.


    cvss
    7.5
    high

    CVSS v3.1 base score out of 10

    epss
    0.46%
    medium

    chance of exploitation in 30 days, 40th percentile of all CVEs

    xyz score
    4.7
    medium

    CyberXYZ composite out of 10

    fig. 01 — GHSA-5rvq-cxj2-64vf, the advisory selected below

    // 9 advisories

    GHSA-5rvq-cxj2-64vf

    HIGHGitHub ratingCVE-2026-53539
    // summary

    When parsing application/x-www-form-urlencoded bodies, QuerystringParser located the field separator with a two step lookup: it first scanned the entire remaining buffer for &, and only when no & existed anywhere ahead did it fall back to scanning for ;. For a body that uses ; as the separator and contains no &, every field iteration performed a full failed & scan over the entire remaining buffer before locating the nearby ;. With N semicolon separated fields in a chunk of size B, this yields O(B^2) byte comparisons per chunk.

    An attacker can submit a small crafted body of the form a;a;a;... and cause the parser to spend seconds of CPU per request. A handful of concurrent requests can exhaust worker processes.

    // details

    In python_multipart/multipart.py, both the FIELD_NAME and FIELD_DATA states located the next separator like this:

    sep_pos = data.find(b"&", i)
    if sep_pos == -1:
        sep_pos = data.find(b";", i)

    data.find(b"&", i) scans from i to the end of the buffer and returns -1 only when there is no & anywhere in the remainder. For a ; separated body with no &, this failed full buffer scan repeats once per field, making parsing quadratic in the body length.

    For example, a 1 MiB url encoded body consisting of a; repeated ~500,000 times, submitted with Content-Type: application/x-www-form-urlencoded, causes the parser to perform on the order of 10^11 byte comparisons, consuming several seconds of CPU for a single request. Cost scales quadratically with chunk size.

    The parser is reachable through the public QuerystringParser class and through the high level FormParser, create_form_parser, and parse_form APIs for url encoded bodies. It is also the parser Starlette and FastAPI use for application/x-www-form-urlencoded request bodies via request.form().

    // impact

    Uncontrolled CPU consumption (denial of service). Parsing is synchronous, so a single small crafted form body occupies the handling worker for seconds, blocking any other work on that worker until parsing finishes. Sustained concurrent requests keep workers continuously busy, degrading or denying service.

    // mitigation

    Upgrade to python-multipart 0.0.30 or later, which treats only & as a field separator (per the WHATWG URL standard) using a single bounded scan, making parsing linear in the body length.

    // cvss v3.1 vector

    CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

    Attack vector
    Network
    Attack complexity
    Low
    Privileges required
    None
    User interaction
    None
    Scope
    Unchanged
    Confidentiality
    None
    Integrity
    None
    Availability
    High

    Checked 2026-11-08 at 23:16 UTC. The most recent advisory here was published 2026-06-15. Updated continuously from NVD, GHSA, OSV and CNA feeds.

    Think a verdict here is wrong? Tell us — we respond within 2 business days.