Security experts have identified a vulnerability in the Claude Code extension for Visual Studio Code that can potentially expose files located outside the designated trusted workspaces. This extension, widely used with over 29 million installations, was found to display misleading permission prompts, making it difficult for users to determine the actual location of files.
Understanding the Symlink Vulnerability
The issue revolves around symlinks, which are shortcuts that point to files or folders elsewhere. In tests, a directory named ./helpdocs within the workspace was linked to an external location. When attempting to write a file, the permission prompt only displayed the workspace path, not indicating that the file was outside the trusted area.
This flaw is not new; it has been previously detected in the command-line version of Claude Code. Despite Anthropic addressing a similar display flaw in past iterations, the VS Code extension remains vulnerable, as highlighted by researcher Carl Pearson in his November 2026 report.
Consequences of Misleading Prompts
The symlink issue presents significant risks, especially if a malicious agent exploits it. Attackers could manipulate users into granting access to seemingly safe paths, potentially exposing sensitive information such as SSH keys. The severity of the risk is contingent on the existence of symlinks that lead to sensitive data locations.
Anthropic’s response to this finding has been to categorize the report as informative, asserting that the prompt alone suffices for security. However, this stance has been questioned, as the prompt’s accuracy is crucial for maintaining a secure boundary within workspaces.
Recommended Precautions and Future Outlook
Given the absence of an official patch, developers are advised to manually verify file paths using the realpath command before approving any access requests. This step can help identify if a symlink is redirecting files outside the intended workspace.
Additionally, it is crucial for teams to routinely examine repositories for unexpected symlinks following each synchronization. The emergence of malicious extensions in marketplaces further underscores the importance of vigilance when utilizing such tools.
The reliance on AI tools in development environments emphasizes the need for robust permission controls. As organizations continue to integrate these technologies, addressing these vulnerabilities becomes imperative to safeguard sensitive data and maintain trust in development tools.
