---
schema_version: '1.0'
id: security-20260812-6521d8
title: 'CVE-2024-47874: Starlette Denial of service (DoS) via multipart/form-data'
url: https://osv.dev/vulnerability/PYSEC-2026-1943
url_hash: 6521d8704af16a6541a4465d8f48e42ee876472556b0cfca2cf6559c20ba0d85
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-1943
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2024-47874
- PYSEC-2026-1943
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
- starlette
- PyPI
lang: en
published_at: '2026-07-07T14:34:43Z'
fetched_at: '2026-08-12T16:00:04.873416Z'
updated_at: '2026-08-22T14:53:01Z'
status: published
content_hash: 17e3aa543fded1bbfa0b2e3fa11488a940adab830e45b1e3c1549d3c851d7308
content_changed_at: '2026-08-22T13:15:22.049819Z'
license_note: full
summary: Starlette Denial of service (DoS) via multipart/form-data
summary_source: rss
summary_en: Starlette Denial of service (DoS) via multipart/form-data
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2024-47874
- Denial
- DoS
- form-data
- IRIAM SERVICE
- Leidos
- library vulnerability
- multipart
- PyPI
- PYSEC-2026-1943
- service
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
- software security
- starlette
- via
entities_en:
- name: CVE
  type: data
- name: IRIAM SERVICE
  type: organization
- name: Leidos
  type: organization
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
- name: IRIAM SERVICE
  type: organization
- name: Leidos
  type: organization
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
- name: LIVER
  type: person
  weight: 1.0
computed_at: '2026-08-22T14:52:56Z'
---

# CVE-2024-47874: Starlette Denial of service (DoS) via multipart/form-data

## TL;DR
Starlette Denial of service (DoS) via multipart/form-data

## Key Points
- cve / CVE-2024-47874 / PYSEC-2026-1943 / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N / starlette / PyPI

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

**Details:**
### Summary
Starlette treats `multipart/form-data` parts without a `filename` as text form fields and buffers those in byte strings with no size limit. This allows an attacker to upload arbitrary large form fields and cause Starlette to both slow down significantly due to excessive memory allocations and copy operations, and also consume more and more memory until the server starts swapping and grinds to a halt, or the OS terminates the server process with an OOM error. Uploading multiple such requests in parallel may be enough to render a service practically unusable, even if reasonable request size limits are enforced by a reverse proxy in front of Starlette.

### PoC

```python
from starlette.applications import Starlette
from starlette.routing import Route

async def poc(request):
    async with request.form():
        pass

app = Starlette(routes=[
    Route('/', poc, methods=["POST"]),
])
```

```sh
curl http://localhost:8000 -F 'big=</dev/urandom'
```

### Impact
This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) accepting form requests.

**References:**
- https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vw
- https://nvd.nist.gov/vuln/detail/CVE-2024-47874
- https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733
- https://github.com/encode/starlette
- https://pypi.org/project/starlette
- https://github.com/advisories/GHSA-f96h-pmfr-66vw

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

## Source
元記事: [CVE-2024-47874: Starlette Denial of service (DoS) via multipart/form-data](https://osv.dev/vulnerability/PYSEC-2026-1943) — published 2026-07-07T14:34:43Z
