Skip to main content

Snyk agent scan: Starlette: SSRF and NTLM credential theft via UNC paths in StaticFiles on Windows (CVE-2026-48818)

0
High
Published: 08/13/2026 (08/13/2026, 17:35:48 UTC)
Source: GCVE Database
Product: snyk-agent-scan

Description

Starlette's StaticFiles component on Windows platforms has a vulnerability where resolving UNC paths triggers outbound SMB connections, leaking NTLMv2 credentials. This occurs because os.path.realpath resolves UNC paths before containment checks, causing server-side request forgery (SSRF). The vulnerability affects default configurations (follow_symlink=False) and can expose service account credentials to attackers. Non-Windows systems and configurations using follow_symlink=True are not affected. Mitigations include using dedicated web servers for static files or blocking outbound SMB traffic.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

Homebrewmore threats →ghsa
snyk-agent-scan
pkg:brew/snyk-agent-scan
Affected versions
>=0.4.3 <0.5.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/22/2026, 17:28:55 UTC

Technical Analysis

The vulnerability in Starlette's StaticFiles on Windows arises from the use of os.path.realpath to resolve requested paths. When a UNC path (e.g., \\attacker.com\share) is provided, os.path.realpath triggers an SMB connection to the remote host, causing the server to send NTLMv2 authentication credentials. This happens before the path containment check rejects the request, resulting in credential leakage despite a 404 HTTP response. The issue affects the default follow_symlink=False configuration, while follow_symlink=True uses os.path.abspath, which does not perform I/O and is not vulnerable. This SSRF allows any client to cause the server to authenticate to an attacker-controlled SMB server, potentially enabling offline cracking or relay attacks. The vulnerability impacts applications running on Windows that serve static files with StaticFiles, including those using frameworks like FastAPI.

Potential Impact

The vulnerability allows unauthenticated remote attackers to cause the server to initiate SMB connections to attacker-controlled hosts, leaking the service account's NTLMv2 credentials. This credential disclosure can lead to offline cracking or relay attacks, compromising internal network security. Additionally, attackers can infer internal SMB hosts by timing responses. The HTTP response to the triggering request is a benign 404, so exploitation may go unnoticed. The impact is limited to Windows environments running affected versions of StaticFiles in the default configuration.

Mitigation Recommendations

A patch is available for affected versions. Applications not running on Windows are not affected. On Windows, it is recommended to serve static files through dedicated web servers such as nginx or IIS instead of using StaticFiles. Alternatively, blocking outbound SMB traffic (port 445) from the application host prevents credential leakage even if UNC paths are resolved. Using the follow_symlink=True configuration branch also avoids the vulnerability as it uses os.path.abspath, which does not trigger SMB connections.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
BREW-snyk-agent-scan-CVE-2026-48818
Osv Schema Version
1.7.3
Ecosystems
["Homebrew"]
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6ada44e64d27ba8daa6a52b4

Added to database: 10/22/2026, 17:16:22 UTC

Last enriched: 10/22/2026, 17:28:55 UTC

Last updated: 10/22/2026, 17:28:55 UTC

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses