CVE-2026-48818: Starlette SSRF And NTLM Credential Theft Vulnerability
HIGHCVE-2026-48818 is a HIGH (CVSS 7.5) ssrf and ntlm credential theft vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Starlette libraries in the PyPI ecosystem. The issue involves ssrf and ntlm credential theft via unc paths in staticfiles on windows. Remediation is available by upgrading affected packages to version 1.1.0.
CVE-2026-48818 at a Glance
Security Impact
CVSS: 7.5
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:H/I:N/A:N).
How to Fix CVE-2026-48818
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-48818, 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-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. 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-48818 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-48818?
Which Starlette versions are affected?
What version fixes CVE-2026-48818?
Is starlette affected?
What is the CVSS score of CVE-2026-48818?
What CWE is associated with CVE-2026-48818?
How can I check PyPI dependencies for CVE-2026-48818?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wqp7-x3pw-xc5r",
"modified" : "2026-06-15T20:16:30Z",
"published" : "2026-06-15T20:16:30Z",
"aliases" : [ "CVE-2026-48818" ],
"summary" : "Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows",
"details" : "### Summary\n\nWhen 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.\n\n### Details\n\n`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.\n\nThis 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.\n\n### Impact\n\nApplications 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.\n\n### Mitigation\n\nApplications 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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-wqp7-x3pw-xc5r"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Kludex/starlette"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-15T20:16:30Z",
"nvd_published_at" : null
}
}