🛡️ CVE-2026-48818 — starlette
Description
Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows
Summary
When serving static files on Windows, StaticFiles resolves the requested path with [os.path.realpath](https://docs.python.org/3/library/os.path.html#os.path.realpath). If a UNC path (such as \\attacker.com\share) reaches the resolver, realpath causes the process to open a connection to the remote host over SMB (port 445). This is a server-side request forgery (SSRF) that leaks the service account's NTLMv2 credentials to the attacker-controlled host, which can then be cracked offline or relayed to other hosts.
Details
StaticFiles.lookup_path() joins the requested path onto the served directory and calls [os.path.realpath](https://docs.python.org/3/library/os.path.html#os.path.realpath) on the result before checking containment with [os.path.commonpath](https://docs.python.org/3/library/os.path.html#os.path.commonpath). On Windows, a UNC path is absolute, so [os.path.join](https://docs.python.org/3/library/os.path.html#os.path.join) discards the served directory and realpath resolves the bare UNC path, triggering the outbound SMB connection and NTLM authentication before the containment check rejects the path. The HTTP response is a benign 404, but the credential disclosure has already happened. POSIX systems are not affected.
This only affects the default configuration (follow_symlink=False), which uses [os.path.realpath](https://docs.python.org/3/library/os.path.html#os.path.realpath). The follow_symlink=True branch uses [os.path.abspath](https://docs.python.org/3/library/os.path.html#os.path.abspath), which performs no I/O.
Impact
Applications running on Windows that serve files with StaticFiles (directly, or via a framework built on Starlette such as FastAPI) in the default configuration are affected. StaticFiles is typically unauthenticated, so any client can trigger the SMB connection and leak the service account's NTLMv2 hash. A secondary impact is discovering internal hosts reachable over SMB by timing responses for valid versus invalid addresses.
Mitigation
Applications not running on Windows are not affected. On Windows, serving static files through a dedicated web server (such as nginx or IIS) instead of StaticFiles avoids the issue. Blocking outbound SMB (port 445) from the application host prevents the credential disclosure even if a UNC path is resolved.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.
Weakness class
CVE-2026-48818 is classified as CWE-918: Server-Side Request Forgery (SSRF). The server fetches a URL supplied by the caller, which can be pointed at internal systems it alone can reach.
Affected software
CVE-2026-48818 is recorded against 1 package.
- starlette (fixed in 1.1.0)
Timeline and source
Published on 15 June 2026 and last revised on 4 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
References
Details
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| starlette | — | 1.1.0 |
References
Similar Threats
- Unknown CLSA-2025-1757031156
- Unknown CLSA-2025-1764115957
- Unknown CLSA-2025-1764288754
- Unknown CLSA-2026-1769040755
- Unknown CLSA-2026-1781052728
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Site Security Check
Is starlette part of your stack?
CVE-2026-48818 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.