3.7low
Python-Multipart: Semicolon treated as querystring field separator enables parameter smuggling
- Severity
- 3.7low CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.19% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-6jv3-5f52-599mPYSEC-2026-3037
Description
Python-Multipart is a streaming multipart parser for Python. Prior to 0.0.30, QuerystringParser treated ; as a field separator in application/x-www-form-urlencoded bodies, in addition to &. The WHATWG URL standard, modern browsers, and Python's urllib.parse (since the CVE-2021-23336 fix) treat only & as a separator. This creates a parser differential: the same bytes are tokenized into different fields than a WHATWG compliant intermediary would produce, allowing an attacker to smuggle extra form fields past an upstream body inspecting component. This vulnerability is fixed in 0.0.30.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Kludex python-multipart | < 0.0.30 | CVE List |
| python-multipart (PyPI) | before 0.0.30 | GitHub Advisory Database, PyPA Advisory Database |
| fastapiexpert python-multipart | before 0.0.30 | NVD |
All scores
| GitHub_M | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
| PyPA Advisory Database | 3.7low CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
What each source says
CVE List
Python-Multipart is a streaming multipart parser for Python. Prior to 0.0.30, QuerystringParser treated ; as a field separator in application/x-www-form-urlencoded bodies, in addition to &. The WHATWG URL standard, modern browsers, and Python's urllib.parse (since the CVE-2021-23336 fix) treat only & as a separator. This creates a parser differential: the same bytes are tokenized into different fields than a WHATWG compliant intermediary would produce, allowing an attacker to smuggle extra form fields past an upstream body inspecting component. This vulnerability is fixed in 0.0.30.
GitHub Advisory Database
Summary
QuerystringParser treated ; as a field separator in application/x-www-form-urlencoded bodies, in addition to &. The WHATWG URL standard, modern browsers, and Python's urllib.parse (since the CVE-2021-23336 fix) treat only & as a separator. This creates a parser differential: the same bytes are tokenized into different fields than a WHATWG compliant intermediary would produce, allowing an attacker to smuggle extra form fields past an upstream body inspecting component.
Details
In python_multipart/multipart.py, the FIELD_NAME and FIELD_DATA states located the next separator by scanning for & and, failing that, for ;:
sep_pos = data.find(b"&", i)
if sep_pos == -1:
sep_pos = data.find(b";", i)
As a result, ; acted as a field boundary. Because the fallback only triggered when no & remained in the current chunk, tokenization also depended on unrelated bytes later in the buffer and on how the body was split across write() calls. This is the same class of issue as CVE-2021-23336 in CPython's urllib.parse.
For example, a body inspecting WAF or gateway that follows the WHATWG rule (only & separates fields) receives:
role=user&x=;role=admin
The upstream parses two fields, role=user and x=";role=admin", sees a benign role=user, and forwards the request. QuerystringParser parsed the same bytes as three fields: role="user", x="", and role="admin". The application (for example via Starlette/FastAPI request.form(), where the last value wins) then received role=admin, a value the upstream validator never saw.
The parser is reachable through the public QuerystringParser class, the high level FormParser, create_form_parser, and parse_form APIs, and Starlette/FastAPI request.form() for url encoded bodies.
Impact
Interpretation conflict / HTTP parameter pollution. An attacker can smuggle extra or overriding form fields past an upstream component that applies the WHATWG separator rule, reaching the backend with parameters the intermediary did not observe.
Mitigation
Upgrade to python-multipart 0.0.30 or later, which treats only & as a field separator per the WHATWG URL standard. ; is parsed as ordinary field data, matching urllib.parse, browsers, and other compliant parsers.
NVD (es)
Python-Multipart es un analizador multipart de streaming para Python. Antes de la versión 0.0.30, QuerystringParser trataba el ; como un separador de campos en cuerpos application/x-www-form-urlencoded, además del &. El estándar de URL de WHATWG, los navegadores modernos y urllib.parse de Python (desde la corrección de CVE-2021-23336) tratan solo el & como un separador. Esto crea un diferencial de analizador: los mismos bytes son tokenizados en campos diferentes de los que produciría un intermediario compatible con WHATWG, permitiendo a un atacante introducir de contrabando campos de formulario adicionales más allá de un componente de inspección de cuerpo ascendente. Esta vulnerabilidad está corregida en la versión 0.0.30.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-53538 changed 2026-06-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-6jv3-5f52-599m changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-53538 changed 2026-10-25 | Public domain |
| PyPA Advisory Database | PYSEC-2026-3037 changed 2026-07-13 | CC-BY-4.0 |