Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') Affecting starlette package, versions [,1.1.0)


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.21% (12th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-STARLETTE-17342514
  • published16 Jun 2026
  • disclosed15 Jun 2026
  • creditUnknown

Introduced: 15 Jun 2026

CVE-2026-48817  (opens in a new tab)
CWE-470  (opens in a new tab)

How to fix?

Upgrade starlette to version 1.1.0 or higher.

Overview

starlette is a The little ASGI library that shines.

Affected versions of this package are vulnerable to Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') when dispatching HTTP requests to endpoint attributes via getattr. An attacker can invoke internal methods not intended as HTTP handlers by sending requests with non-standard HTTP methods whose names match internal attribute names, potentially bypassing authorization checks.

Note: This is only exploitable if an HTTPEndpoint subclass is registered through Route(...) without specifying the methods= argument and the subclass defines additional methods matching non-standard HTTP-method token shapes that accept a single request argument and return a response.

Workaround

This vulnerability can be mitigated by registering HTTPEndpoint subclasses with an explicit methods= argument on the Route, listing only the supported HTTP verbs.

CVSS Base Scores

version 4.0
version 3.1