Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted HTML file or workspace to victim
-
DeliveryVictim opens file in VS Code with Live Preview installed
-
ExploitVictim activates Live Preview feature
-
ExecutionExtension's local server resolves traversal path without sanitization
-
ImpactAttacker reads sensitive files from victim's filesystem
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Relative path traversal prevention
|
| Exploitation Conditions | Exploitation requires that the Visual Studio Code Live Preview extension version 0.4.0 through 0.4.18 is installed on the target workstation - this extension is not bundled with VS Code and must be explicitly installed by the user. The victim must actively trigger a preview (UI:R) on an HTML file or workspace containing attacker-controlled path references; simply opening VS Code is insufficient. The attack is local (AV:L), meaning the attacker must either have a presence on the same machine or must supply malicious content that the developer opens and previews. File disclosure is bounded by the OS permissions of the VS Code process - typically the developer's own user account. Limiting factors: the extension is not universally installed, exploitation is not automatable (SSVC: Automatable: no), requires victim interaction, and is platform-agnostic but inherently a developer workstation scenario with no network exposure of the preview server to remote hosts. |
| Impact | Real-world risk is low-to-moderate despite the CVSS Medium score of 5.5. The attack vector is strictly local (AV:L) and requires user interaction (UI:R), confining viable attackers to those with physical or remote desktop access to a developer workstation, or those capable of socially engineering a developer into opening a crafted file. EPSS corroborates this - at 0.04% (12th percentile), opportunistic automated exploitation is essentially ruled out. SSVC confirms Exploitation: none and Technical Impact: partial, consistent with a narrow, non-automated attack path. The vulnerability is not in CISA KEV and no public proof-of-concept has been identified. The most significant signal is C:H in the CVSS vector: a successful exploit could yield high-value local file disclosure (SSH keys, .env files, tokens). However, this only materializes against an actively developing user who has the affected extension installed and previews attacker-controlled content. The realistic population at risk is limited to developers using the Live Preview feature on affected versions. |
| Exploit ScenarioDerived | An attacker with local machine access, or one who persuades a developer to open a crafted HTML file in VS Code, embeds resource references containing relative path traversal sequences (e.g., an image source of '../../../../home/user/.ssh/id_rsa') in the file. When the victim activates the Live Preview feature, the extension's local HTTP server resolves the malformed path without sufficient sanitization, serving the referenced file from outside the workspace and returning its contents to the preview pane or to any process monitoring the local server's responses. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 23, 2026
Path traversal in the Visual Studio Code Live Preview extension (versions 0.4.0 through 0.4.18) enables a local attacker to read arbitrary files outside the intended workspace directory by exploiting insufficient path validation in the extension's embedded HTTP server. The flaw (CWE-23) can expose sensitive local files such as credentials or private keys to any party who can supply a crafted file to a developer and have them trigger the preview feature. No public exploit code exists and the vulnerability is absent from CISA KEV; Microsoft has released a fix in version 0.4.19.
RemediationAI
The primary and recommended fix is to update the Visual Studio Code Live Preview extension to version 0.4.19 or later, which Microsoft has confirmed resolves this path traversal, per the MSRC advisory at https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-41612. Updates are applied via the VS Code Extensions panel (View > Extensions > search 'Live Preview' > Update) or by running 'code --install-extension ms-vscode.live-server' from the terminal. If immediate patching is not feasible, disabling the Live Preview extension entirely via the Extensions panel eliminates the attack surface at the cost of losing in-editor HTML preview functionality. Instructing developers not to open untrusted workspaces or HTML files while the extension is active also reduces exposure, though this is a behavioral control rather than a technical one.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in microsoft, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The affected product is the Microsoft Visual Studio Code Live Preview extension (CPE: cpe:2.3:a:microsoft:visual_studio_code_-_live_preview_extension), versions 0.4.0 through 0.4.18 per EUVD-2026-29695. The extension runs an embedded local HTTP server inside VS Code to render HTML files as live, in-editor browser previews during development. CWE-23 (Relative Path Traversal) identifies the root cause: the server does not adequately canonicalize or sanitize file paths before resolving them, allowing traversal sequences such as '../../' in resource references (e.g., img src, script src, fetch URLs) to escape the intended workspace web root and reach arbitrary filesystem locations accessible to the current user. This class of flaw is endemic to developer-facing embedded web servers that prioritize convenience, where strict path confinement is often an afterthought.
Know when Visual Studio Code Live Preview Extension gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Local attack vector with required user interaction reflects developer workstation context; no integrity or availability impact from read-only path traversal.
Primary rating from Vendor (microsoft).
CVSS VectorVendor: microsoft
DescriptionCVE.org
Relative path traversal in Visual Studio Code allows an unauthorized attacker to disclose information locally.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-29695
NVD
CVE.org
EPSS
Vulnrichment
VulDB
GitHub PoC
Exploit-DB