---
schema_version: '1.0'
id: security-20260711-8dd28c
url: https://osv.dev/vulnerability/GHSA-wqp7-x3pw-xc5r
url_hash: 8dd28c470d3d6b32c7d45fc51f6531faafbae9abe180b2cefa62ec5e9d93d5be
canonical_url: https://osv.dev/vulnerability/GHSA-wqp7-x3pw-xc5r
source: osv:ghsa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-48818
- GHSA-wqp7-x3pw-xc5r
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- starlette
- PyPI
lang: en
published_at: '2026-06-15T20:16:30Z'
fetched_at: '2026-07-11T06:37:18Z'
updated_at: '2026-07-11T06:40:39Z'
status: published
content_hash: 4b737bc20c9efb08f5de37f01cd4bc20ae127a05bab2a229be50af34cd0855f3
license_note: full
summary: 'Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on
  Windows'
summary_source: rss
summary_en: 'Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles
  on Windows'
entities:
- name: AND CaaaLL
  type: person
key_facts: []
related: []
related_auto:
- name: Shibu3 project
  type: organization
  weight: 1.0
- name: 豊田ルナ
  type: person
  weight: 1.0
- name: 東条澪
  type: person
  weight: 1.0
title: 'CVE-2026-48818: Starlette: SSRF and NTLM credential theft via UNC paths in
  StaticFiles on Windows'
---

# CVE-2026-48818: Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows

## TL;DR
Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows

## Key Points
- cve / CVE-2026-48818 / GHSA-wqp7-x3pw-xc5r / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N / starlette / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
**Advisory:** GHSA-wqp7-x3pw-xc5r (CVE-2026-48818)

**Affected (your watchlist):**
- `PyPI:starlette` 0.41.3 → fixed in 1.1.0 [docker/docker-portal]
- `PyPI:starlette` 1.0.0 → fixed in 1.1.0 [docker/local]

**Details:**
### 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.

**References:**
- https://github.com/Kludex/starlette/security/advisories/GHSA-wqp7-x3pw-xc5r
- https://github.com/Kludex/starlette

_Data: OSV.dev (upstream: ghsa) — https://osv.dev/vulnerability/GHSA-wqp7-x3pw-xc5r_

## Source
元記事: [CVE-2026-48818: Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows](https://osv.dev/vulnerability/GHSA-wqp7-x3pw-xc5r) — published 2026-06-15T20:16:30Z
