CVE-2026-48817: Starlette Arbitrary HTTP Method Dispatched To Vulnerability
MODERATECVE-2026-48817 is a MODERATE (CVSS 5.3) arbitrary http method dispatched to vulnerability (CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')) affecting Starlette libraries in the PyPI ecosystem. The issue involves arbitrary http method dispatched to `httpendpoint` attributes via `getattr`. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2026-48817 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-48817
To remediate this vulnerability, upgrade all affected Starlette dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install starlette>=1.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show starlette
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-48817, inspect your installed packages using pip:
pip show starlette
Analyze the terminal output to locate any version of Starlette in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.
Note: The pip show starlette command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-470: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection'), where the product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code. In Starlette, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-48817 Affected Starlette Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
starlette
|
PyPI |
< 1.1.0
|
1.1.0
|
References
Frequently Asked Questions
What is CVE-2026-48817?
Which Starlette versions are affected?
What version fixes CVE-2026-48817?
Is starlette affected?
What is the CVSS score of CVE-2026-48817?
What CWE is associated with CVE-2026-48817?
How can I check PyPI dependencies for CVE-2026-48817?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x746-7m8f-x49c",
"modified" : "2026-07-09T21:05:46Z",
"published" : "2026-06-15T20:16:05Z",
"aliases" : [ "CVE-2026-48817" ],
"summary" : "Starlette: Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr`",
"details" : "### Summary\n\nWhen dispatching a request, `HTTPEndpoint` selects the handler by lowercasing the HTTP method and looking it up as an attribute with `getattr`, without restricting the lookup to a known set of HTTP verbs.\n\nWhen an `HTTPEndpoint` subclass is registered through `Route(...)` without an explicit `methods=` argument, the route does not constrain the method and every method reaches the endpoint. If a non-standard HTTP method whose lowercased name matches an attribute on the endpoint subclass reaches the endpoint, that attribute is invoked as if it were a request handler. An attacker can use this to reach methods that were never meant to be HTTP handlers, such as internal helpers, without the authorization checks applied by the intended public handler.\n\n### Details\n\n`HTTPEndpoint` uses the client-supplied method name to resolve an instance attribute, without validating it against the set of HTTP verbs the endpoint supports. A method such as `_DO_DELETE` therefore resolves an attribute like `_do_delete` and invokes it. Non-standard methods are valid [RFC 9110](https://www.rfc-editor.org/rfc/rfc9110#name-method) token methods, so an endpoint must not treat the method name as a trusted attribute selector.\n\n### Impact\n\nAn application is affected when all of the following hold:\n\n* It defines an `HTTPEndpoint` subclass and registers it via `Route(...)` without an explicit `methods=` argument.\n* The subclass defines additional methods whose names match a non-standard HTTP-method token shape and that accept a single `request` argument and return a response.\n\nThis also affects frameworks built on Starlette, like FastAPI.\n\n### Mitigation\n\nRegister `HTTPEndpoint` subclasses with an explicit `methods=` argument on the `Route`, listing only the HTTP verbs the endpoint supports. The route then rejects any other method with `405 Method Not Allowed` before it reaches the endpoint, so non-standard methods cannot resolve an attribute.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "starlette"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Kludex/starlette/security/advisories/GHSA-x746-7m8f-x49c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-48817"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Kludex/starlette"
}, {
"type" : "WEB",
"url" : "https://github.com/Kludex/starlette/releases/tag/1.1.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-470" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-15T20:16:05Z",
"nvd_published_at" : "2026-06-17T20:17:22Z"
}
}