Skip to main content

Starlette EUVDEUVD-2026-38319

| CVE-2026-54283 HIGH
Allocation of Resources Without Limits or Throttling (CWE-770)
2026-06-15 https://github.com/Kludex/starlette GHSA-82w8-qh3p-5jfq
7.5
CVSS 3.1 · Vendor: https://github.com/Kludex/starlette
Share

Severity by source

Vendor (https://github.com/Kludex/starlette) PRIMARY
7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI
7.5 HIGH

Remote unauthenticated POST to any request.form() endpoint with no user interaction; only availability is impacted via event-loop blocking or memory exhaustion.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE
HIGH
qualitative

Primary rating from Vendor (https://github.com/Kludex/starlette).

CVSS VectorVendor: https://github.com/Kludex/starlette

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

Lifecycle Timeline

2
Source Code Evidence Fetched
Jun 15, 2026 - 21:21 vuln.today
Analysis Generated
Jun 15, 2026 - 21:21 vuln.today

DescriptionCVE.org

Summary

request.form() accepts max_fields and max_part_size to bound resource consumption while parsing form data. These limits are enforced for multipart/form-data, but silently ignored for application/x-www-form-urlencoded. An unauthenticated attacker can therefore send a urlencoded body with an arbitrarily large number of fields or an arbitrarily large field, even when the application configured limits it believed would apply.

Details

request.form() dispatches to a different parser depending on the Content-Type. For multipart/form-data the max_files, max_fields, and max_part_size limits are forwarded to the parser, but for application/x-www-form-urlencoded the parser is constructed without them. It has no max_fields or max_part_size parameter to receive them, and it appends every field with no count check and accumulates each field's name and value with no size check. The configured limits are therefore both unreachable and unenforced for url-encoded bodies.

Because the url-encoded parser does its work synchronously between stream reads, the two attack shapes have different effects:

  • Field count drives CPU and event-loop blocking. A body of ~1,000,000 fields (a sub-10MB payload such as f0=v&f1=v&...) blocks the worker's event loop for several seconds while parsing, during which the worker serves no other request.
  • Field size drives memory. A single large field value (e.g. a 50MB value) is buffered in full to build the FormData, forcing memory allocation proportional to the request body.

The equivalent multipart/form-data request is correctly rejected with 400 Too many fields / 400 Field exceeded maximum size.

Impact

This Denial of service (DoS) vulnerability affects all applications built with Starlette (or FastAPI) that call request.form() on application/x-www-form-urlencoded requests. A single request with a very large number of fields blocks the event loop for several seconds, and a single request with a very large field forces unbounded memory allocation; in either case, parallel requests can render the service unusable. A reverse proxy that enforces a request body size limit reduces but does not eliminate the exposure, since a sub-10MB body is already enough to block the event loop.

Mitigation

Upgrade to a patched version, which forwards max_fields and max_part_size to the url-encoded parser and enforces them while parsing, raising before the oversized field or excess fields are accumulated. The defaults match multipart/form-data (max_fields=1000, max_part_size=1MB) and can be customized via request.form(max_fields=..., max_part_size=...).

AnalysisAI

Denial of service in Starlette (and downstream FastAPI applications) versions 0.4.1 through 1.3.0 allows remote unauthenticated attackers to exhaust CPU or memory by sending crafted application/x-www-form-urlencoded request bodies. The max_fields and max_part_size limits accepted by request.form() are silently ignored for urlencoded content, so a sub-10MB body can block the event loop for seconds or force unbounded memory allocation. No public exploit identified at time of analysis, but the bug is documented in detail in the upstream GHSA advisory.

Technical ContextAI

Starlette is the ASGI framework that underpins FastAPI and many Python async web services. Its request.form() method dispatches to one of two parsers based on Content-Type: a multipart parser that correctly receives max_files, max_fields and max_part_size, and a urlencoded parser that was constructed without those parameters and lacks any field-count or size checks. The urlencoded parser also runs synchronously between stream reads, so heavy parsing blocks the event loop for the entire worker. This is a textbook CWE-770 (Allocation of Resources Without Limits or Throttling) issue: the limit-enforcement code path simply does not exist for one of the supported content types. The affected package per CPE pkg:pip/starlette covers all versions >= 0.4.1 and < 1.3.1.

RemediationAI

Upgrade Starlette to the vendor-released patch version 1.3.1 or later (pip install --upgrade 'starlette>=1.3.1'); the patched release forwards max_fields and max_part_size to the urlencoded parser and enforces the same 1000-field / 1MB defaults already used for multipart bodies. FastAPI users should ensure their FastAPI version pulls in the fixed Starlette, or pin starlette>=1.3.1 directly in requirements. Until upgrade is possible, the most effective compensating control is to wrap or replace request.form() with custom code that reads request.body() with a strict Content-Length cap and parses urlencoded data manually with explicit field-count and size checks; a reverse-proxy body size limit (e.g. nginx client_max_body_size set to a low value such as 1MB) materially reduces but does not eliminate exposure because a sub-10MB body still blocks the event loop, and tightening it further may break legitimate uploads. Restricting unauthenticated endpoints that accept form-encoded data, or rejecting application/x-www-form-urlencoded requests where the endpoint expects multipart or JSON, also reduces the attack surface at the cost of API flexibility. See the advisory at https://github.com/Kludex/starlette/security/advisories/GHSA-82w8-qh3p-5jfq for full details.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.0 Affected
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.0 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

Share

EUVD-2026-38319 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy