---
schema_version: '1.0'
id: security-20260812-59fd81
title: 'CVE-2026-53538: python-multipart: Semicolon treated as querystring field separator
  enables parameter smuggling'
url: https://osv.dev/vulnerability/PYSEC-2026-3037
url_hash: 59fd813569e4bd42f9e1a3ad420c8a616fdb4f1742f297b08e6720bef32e18e5
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-3037
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-53538
- PYSEC-2026-3037
- severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
- python-multipart
- PyPI
lang: en
published_at: '2026-07-13T15:46:17Z'
fetched_at: '2026-08-12T16:00:04.810523Z'
updated_at: '2026-08-22T14:53:00Z'
status: published
content_hash: fc0ebc7a0314b73ea84aa1962a9392515feadf24e99e6e78683001a4a3289b7d
content_changed_at: '2026-08-22T13:15:21.969485Z'
license_note: full
summary: 'python-multipart: Semicolon treated as querystring field separator enables
  parameter smuggling'
summary_source: rss
summary_en: 'python-multipart: Semicolon treated as querystring field separator enables
  parameter smuggling'
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2026-53538
- enables
- field
- Garfield
- library vulnerability
- parameter
- PyPI
- PYSEC-2026-3037
- python-multipart
- querystring
- Semicolon
- separator
- severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
- smuggling
- software security
- treated
entities_en:
- name: CVE
  type: data
- name: Garfield
  type: location
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Garfield
  type: location
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
computed_at: '2026-08-22T14:52:48Z'
---

# CVE-2026-53538: python-multipart: Semicolon treated as querystring field separator enables parameter smuggling

## TL;DR
python-multipart: Semicolon treated as querystring field separator enables parameter smuggling

## Key Points
- cve / CVE-2026-53538 / PYSEC-2026-3037 / severity:CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N / python-multipart / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
**Advisory:** PYSEC-2026-3037 (CVE-2026-53538)

**Details:**
### Summary

`QuerystringParser` treated `;` as a field separator in `application/x-www-form-urlencoded` bodies, in addition to `&`. The [WHATWG URL standard](https://url.spec.whatwg.org/#urlencoded-parsing), 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 `;`:

```python
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](https://url.spec.whatwg.org/#urlencoded-parsing). `;` is parsed as ordinary field data, matching `urllib.parse`, browsers, and other compliant parsers.

**References:**
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-6jv3-5f52-599m
- https://github.com/Kludex/python-multipart
- https://pypi.org/project/python-multipart
- https://github.com/advisories/GHSA-6jv3-5f52-599m
- https://nvd.nist.gov/vuln/detail/CVE-2026-53538

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-3037_

## Source
元記事: [CVE-2026-53538: python-multipart: Semicolon treated as querystring field separator enables parameter smuggling](https://osv.dev/vulnerability/PYSEC-2026-3037) — published 2026-07-13T15:46:17Z
