CVE-2026-48817: Starlette · Arbitrary HTTP method dispatched to `HTTPEndpoint` attributes via `getattr`
Affects semgrepSource GCVE Database
Not known to be exploited · CVSS 5.3 Medium : upgrade to 1.165.0 when convenient.
Data as of 31 Oct 2026, 16:23 UTC
- Patch
- Available – fixed in 1.165.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 17 Jun 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade semgrep to 1.165.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewsemgreppkg:brew/semgrepOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate this vulnerability, always register HTTPEndpoint subclasses with an explicit methods= argument on the Route, listing only the HTTP methods the endpoint supports. This causes the route to reject any other HTTP methods with a 405 Method Not Allowed response before reaching the endpoint, preventing non-standard methods from invoking internal attributes. Additionally, upgrade Starlette to version 1.165.0 or later, where this issue is fixed.
Description
Starlette's HTTPEndpoint dispatches HTTP methods by lowercasing the method name and using getattr to call an attribute, without restricting to known HTTP verbs. If a route is registered without an explicit methods= argument, any HTTP method is accepted, allowing non-standard methods to invoke internal endpoint methods unintentionally. This can lead to unauthorized invocation of internal helper methods. The issue affects Starlette versions from 1.137.0 up to but not including 1.165.0 and frameworks built on it like FastAPI. A fix is available in version 1.165.0.