HIGH 7.5

CVE-2026-54283: Starlette Form Parsing Bypass Allows Denial of Service

Starlette, a popular lightweight Python web framework, has a vulnerability in how it handles form submissions. When developers configure size limits to protect their applications from being overwhelmed by large requests, those limits fail to work for one common type of form submission (URL-encoded forms). An attacker can exploit this by sending an extremely large or complex form to crash or degrade the application's performance, even when administrators thought they had protective limits in place. The issue affects versions 0.4.1 through 1.3.0 and is fixed in version 1.3.1.

Source data · NVD / CISA · public domain

CVSS
3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses (CWE)
CWE-770
Affected products
1 configuration(s)
Published / Modified
2026-06-22 / 2026-06-26

NVD description (verbatim)

Starlette is a lightweight ASGI framework/toolkit. From 0.4.1 until 1.3.1, 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. This vulnerability is fixed in 1.3.1.

1 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

Starlette's request.form() method accepts max_fields and max_part_size parameters to constrain resource consumption during form parsing. These limits are correctly enforced for multipart/form-data payloads but are silently ignored for application/x-www-form-urlencoded content. This inconsistency creates a bypass where an unauthenticated remote attacker can send arbitrarily large or numerous fields in URL-encoded form bodies, bypassing the application's stated resource constraints and triggering denial-of-service conditions. The vulnerability stems from differential handling of two standard form encoding types without consistent boundary enforcement.

Business impact

Applications relying on Starlette's form parsing limits to prevent resource exhaustion are unexpectedly exposed to denial-of-service attacks via URL-encoded forms. This can cause application unavailability, performance degradation, or excessive memory consumption. Any internet-facing Starlette application—particularly APIs, web services, or form-heavy applications—becomes vulnerable to simple, unauthenticated attacks that bypass intended safeguards. The risk is heightened because the vulnerability is silent; developers may be unaware their limits are not working as expected.

Affected systems

Starlette versions 0.4.1 through 1.3.0 are affected. Applications using the request.form() method with max_fields or max_part_size configuration are at risk. The vulnerability affects any deployed Starlette-based application that receives untrusted form input, regardless of authentication model. This includes FastAPI applications that rely on Starlette's underlying form handling.

Exploitability

Exploitability is high. No authentication, special privileges, or user interaction is required. An attacker can craft a simple HTTP POST request with a URL-encoded body containing thousands of fields or extremely large field values and send it directly to a vulnerable endpoint. The attack is straightforward and requires minimal resources; standard HTTP tools can execute it. The only barrier is knowledge that the application uses Starlette and accepts form input.

Remediation

Upgrade Starlette to version 1.3.1 or later. This patch correctly enforces max_fields and max_part_size limits for both multipart/form-data and application/x-www-form-urlencoded payloads. Verify the upgrade is applied to all production instances and dependent frameworks like FastAPI that bundle Starlette. No workarounds are available for older versions; patching is the only mitigation.

Patch guidance

Update Starlette to version 1.3.1 or newer as soon as feasible. If using FastAPI or other frameworks that depend on Starlette, ensure those projects have released versions that include the patched Starlette dependency. Test the upgrade in a non-production environment first to verify form handling behavior remains consistent with your application's expectations. The fix is backward-compatible and should not require code changes.

Detection guidance

Monitor application logs and metrics for unusual patterns: sudden spikes in request processing time, memory consumption, or CPU usage tied to form submissions; requests with unusually large numbers of form fields; or requests to endpoints that accept form input with abnormally large payloads. Network-based detection can flag HTTP POST requests with exceptionally large application/x-www-form-urlencoded bodies or unusually high field counts. Review form-handling endpoints in your application code to identify which ones may be exposed.

Why prioritize this

This is a high-priority issue because it combines ease of exploitation (no authentication needed, simple HTTP request), direct denial-of-service impact on availability, and a fundamental bypass of administrator-configured resource controls. The silent failure of limits creates false confidence in security posture. Any internet-facing Starlette application should be treated as urgent.

Risk score, explained

CVSS 3.1 score of 7.5 (HIGH) reflects a network-accessible vulnerability with no authentication or user interaction required, resulting in high impact to availability. The attack vector is simple, complexity is low, and there is no requirement for privileges or user interaction. The scope is unchanged. The score does not award severity points for confidentiality or integrity because this is a denial-of-service vulnerability, but the availability impact is severe.

Frequently asked questions

Does this vulnerability affect my FastAPI application?

If your FastAPI application is running on Starlette 0.4.1 through 1.3.0 and uses form parsing with configured limits, yes. FastAPI depends on Starlette, so you need to ensure your FastAPI version includes the patched Starlette dependency. Check your dependency resolution or update FastAPI to a recent release that includes Starlette 1.3.1 or later.

Can I work around this without upgrading?

There is no reliable workaround. You could implement custom form-parsing middleware at the application level to enforce limits before Starlette processes the request, but this is complex and error-prone. Upgrading to Starlette 1.3.1+ is the recommended approach.

How can I tell if my application has been attacked via this vulnerability?

Look for POST requests to form-handling endpoints with unusually large or field-rich application/x-www-form-urlencoded bodies, accompanied by spikes in processing latency, memory usage, or CPU consumption. Enable request logging to capture request sizes and field counts, then analyze for anomalies.

Does this affect other Python web frameworks?

This vulnerability is specific to Starlette. Other frameworks like Django or Flask have their own form handling code. However, any framework that depends on Starlette (including FastAPI) is affected.

This analysis is provided for informational purposes and reflects the vulnerability as described in the ground-truth source data. Verify all patch versions, affected product versions, and remediation steps against official vendor advisories before deployment. The presence or absence of this vulnerability in a specific installation depends on software versions and configuration; a security assessment of your own systems is necessary. No exploit code or detailed attack steps are provided; this is an intelligence summary only. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).