Skip to main content
Vulnerability Database/CVE-2026-102229

CVE-2026-102229: Visual Studio Code Path Traversal Flaw

CVE-2026-102229 is a path traversal vulnerability in Visual Studio Code that enables authorized attackers to access restricted files and disclose sensitive information over a network. This article covers technical details, affected versions, potential impact, and recommended mitigation strategies.

Published:

CVE-2026-102229 Overview

CVE-2026-102229 is a path traversal vulnerability [CWE-22] in Microsoft Visual Studio Code. The flaw stems from improper limitation of a pathname to a restricted directory. An authorized attacker can exploit this weakness over a network to disclose sensitive information from the targeted system.

Exploitation requires low privileges and user interaction, and the attack can cross a security scope boundary. The resulting impact affects confidentiality only, with no direct effect on integrity or availability.

Critical Impact

An authenticated remote attacker can read files outside the intended workspace directory, leading to disclosure of source code, configuration data, or credentials accessible to the Visual Studio Code process.

Affected Products

  • Microsoft Visual Studio Code
  • Refer to the Microsoft CVE-2026-102229 Advisory for the authoritative list of affected builds
  • Downstream distributions and extensions that embed vulnerable Visual Studio Code components

Discovery Timeline

  • 2026-10-13 - CVE-2026-102229 published to the National Vulnerability Database
  • 2026-10-13 - Last updated in the NVD database

Technical Details for CVE-2026-102229

Vulnerability Analysis

The vulnerability resides in Visual Studio Code's handling of file paths provided through network-reachable interfaces. The application fails to normalize and validate path components before resolving them against the file system. As a result, traversal sequences such as ../ escape the intended workspace or restricted directory.

An authenticated attacker with low privileges can craft requests that reference files outside the permitted boundary. Successful exploitation requires user interaction, typically opening a malicious workspace, repository, or link. Because the scope changes during exploitation, the attacker can access resources belonging to a different security authority than the vulnerable component.

Root Cause

The root cause is insufficient canonicalization of user-controlled path input, a classic instance of [CWE-22]. Path segments containing .., encoded separators, or absolute path prefixes are passed to file-access routines without being resolved against an allow-listed base directory. The application trusts the caller-supplied path rather than enforcing containment within the workspace root.

Attack Vector

The attack is launched over a network against an authenticated Visual Studio Code session. The attacker delivers a crafted workspace, repository, remote development connection, or extension payload that references traversal paths. When the user opens the resource, Visual Studio Code reads the attacker-specified files and returns their contents to a channel the attacker controls. The disclosed data can include source code, SSH keys, environment files, and tokens stored in the user profile.

No verified exploit code is publicly available at this time. Technical details are documented in the Microsoft CVE-2026-102229 Advisory.

Detection Methods for CVE-2026-102229

Indicators of Compromise

  • Visual Studio Code process reading files outside the active workspace, such as ~/.ssh/, ~/.aws/credentials, or /etc/
  • Outbound network connections from code.exe or Code Helper immediately after opening an untrusted workspace or extension
  • Workspace or project files containing path strings with ..\, ../, or URL-encoded traversal sequences in configuration fields

Detection Strategies

  • Monitor Visual Studio Code child processes and file-read telemetry for access to sensitive paths unrelated to the open project
  • Alert on installation of unsigned or newly published extensions followed by unusual file-system enumeration
  • Inspect settings.json, tasks.json, and launch.json for traversal patterns in path parameters

Monitoring Recommendations

  • Ingest endpoint file-access and process telemetry into a centralized data lake for correlation across developer workstations
  • Baseline normal Visual Studio Code file-access patterns per user and flag deviations touching credential stores
  • Track opening of workspaces originating from external email, chat links, or untrusted Git remotes

How to Mitigate CVE-2026-102229

Immediate Actions Required

  • Apply the Visual Studio Code update referenced in the Microsoft CVE-2026-102229 Advisory as soon as it is available
  • Enable Workspace Trust and require explicit approval before opening repositories from untrusted sources
  • Audit installed extensions and remove any that are unused, unsigned, or sourced from unverified publishers

Patch Information

Microsoft has published an advisory for CVE-2026-102229 through the Microsoft Security Response Center. Review the Microsoft CVE-2026-102229 Advisory for fixed build numbers, release channels, and update instructions. Deploy the patched version through managed software distribution to all developer endpoints.

Workarounds

  • Keep Workspace Trust enabled and open untrusted projects only in restricted mode
  • Avoid opening workspaces, repositories, or .code-workspace files received from unverified sources
  • Store credentials and secrets outside the user home directory accessible to the editor process when feasible
  • Restrict outbound network egress from developer endpoints to reduce exfiltration channels
bash
# Verify the installed Visual Studio Code version and compare against the fixed build
code --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.