---
schema_version: '1.0'
id: security-20260812-b284d5
title: 'CVE-2026-42561: python-multipart has Denial of Service via unbounded multipart
  part headers'
url: https://osv.dev/vulnerability/GHSA-pp6c-gr5w-3c5g
url_hash: b284d5513a5f9f42e06de653216b368e71c62ef9826e0197bb6e9a3737851f33
canonical_url: https://osv.dev/vulnerability/GHSA-pp6c-gr5w-3c5g
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-42561
- GHSA-pp6c-gr5w-3c5g
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- python-multipart
- PyPI
lang: en
published_at: '2026-05-06T21:56:14Z'
fetched_at: '2026-08-12T16:00:04.790686Z'
updated_at: '2026-08-22T14:49:09Z'
status: published
content_hash: 6ae9f5cf1b0f797d348970a9de3bf13bfa0b5aa2bf3aa0bb819b26bcb99a7773
content_changed_at: '2026-08-22T13:15:21.950868Z'
license_note: full
summary: python-multipart has Denial of Service via unbounded multipart part headers
summary_source: rss
summary_en: python-multipart has Denial of Service via unbounded multipart part headers
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2026-42561
- Denial
- GHSA-pp6c-gr5w-3c5g
- has
- Hashbrown
- headers
- IRIAM SERVICE
- library vulnerability
- multipart
- part
- PyPI
- python-multipart
- Service
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- software security
- unbounded
- via
- Viant
entities_en:
- name: CVE
  type: data
- name: Hashbrown
  type: creature
- name: IRIAM SERVICE
  type: organization
- name: PyPI
  type: artifact
- name: Viant
  type: organization
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: Hashbrown
  type: creature
- name: IRIAM SERVICE
  type: organization
- name: Viant
  type: organization
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
- name: Alexa Munoz
  type: UNKNOWN
  weight: 1.0
- name: Helen Woodward Animal Center
  type: organization
  weight: 1.0
- name: Lee Asher
  type: person
  weight: 1.0
computed_at: '2026-08-22T14:49:08Z'
---

# CVE-2026-42561: python-multipart has Denial of Service via unbounded multipart part headers

## TL;DR
python-multipart has Denial of Service via unbounded multipart part headers

## Key Points
- cve / CVE-2026-42561 / GHSA-pp6c-gr5w-3c5g / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H / python-multipart / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
**Advisory:** GHSA-pp6c-gr5w-3c5g (CVE-2026-42561)

**Details:**
### Summary

`python-multipart` has a denial of service vulnerability in multipart part header parsing. When parsing `multipart/form-data`, `MultipartParser` previously had no limit on the number of part headers or the size of an individual part header. An attacker could send a request with either many repeated headers without terminating the header block or a single very large header value, causing excessive CPU work before request rejection or completion.

### Impact

Applications that parse attacker-controlled `multipart/form-data` with affected versions of `python-multipart` can experience CPU exhaustion. ASGI applications using Starlette, FastAPI, or other frameworks that invoke `python-multipart` may have worker or event-loop delays while processing malicious upload requests.

### Details

The affected parser states are `HEADER_FIELD_START`, `HEADER_FIELD`, `HEADER_VALUE_START`, `HEADER_VALUE`, and `HEADER_VALUE_ALMOST_DONE`. The issue can be triggered by:

- A multipart part with an oversized individual header value.
- A multipart part with many repeated header lines or an unterminated header block.

Both variants are addressed by enforcing default parser limits for maximum header count and maximum header size.

### Mitigation

Upgrade to `python-multipart` `0.0.27` or later.

If upgrading is not immediately possible, reduce exposure by enforcing request body size limits at the server, proxy, or framework layer. This is only a mitigation; affected versions of `python-multipart` still parse multipart part headers without the default header count and header size limits.

**References:**
- https://github.com/Kludex/python-multipart/security/advisories/GHSA-pp6c-gr5w-3c5g
- https://nvd.nist.gov/vuln/detail/CVE-2026-42561
- https://github.com/Kludex/python-multipart

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-pp6c-gr5w-3c5g_

## Source
元記事: [CVE-2026-42561: python-multipart has Denial of Service via unbounded multipart part headers](https://osv.dev/vulnerability/GHSA-pp6c-gr5w-3c5g) — published 2026-05-06T21:56:14Z
