GhostApproval vulnerability exposes AI coding agents to remote code execution via symlinks

5 Sources

Share

Security firm Wiz uncovered GhostApproval, a systematic security flaw affecting six major AI coding agents including Amazon Q Developer, Anthropic Claude Code, and Cursor. The vulnerability exploits symbolic links to trick agents into writing malicious code outside sandboxed workspaces, potentially granting attackers remote access to developers' machines. While Amazon, Cursor, and Google have issued patches, Anthropic dismissed the issue as outside its threat model, highlighting a critical debate about AI tool security responsibilities.

Ancient Unix Trick Breaks Modern AI Coding Agents

Security researchers at Wiz have discovered a systematic security flaw dubbed the GhostApproval vulnerability that affects six widely used AI coding agents: Amazon Q Developer, Anthropic Claude Code, Augment, Cursor, Google Antigravity, and Windsurf

1

. The vulnerability allows attackers to bypass sandbox restrictions and achieve remote code execution on developers' machines by exploiting symbolic link vulnerabilities, an age-old Unix security weakness that continues to haunt modern AI-driven development tools.

Source: Hacker News

Source: Hacker News

The attack works by tricking AI coding agents into accessing files outside their intended workspace through malicious repositories. An attacker creates a repo containing a symlink disguised as an innocent configuration file like project_settings.json, which actually points to sensitive system files such as ~/.ssh/authorized_keys

4

. When a developer clones the repository and asks their agent to "set up the workspace" or "follow the README," the agent writes an attacker's SSH public key to the victim's authentication file, granting password-less access to the machine

1

.

The Human in the Loop Problem

What makes this security flaw particularly dangerous is how it undermines the human in the loop safety mechanism that many AI tool security implementations rely on. While most affected AI coding agents use sandboxes or user confirmation prompts before executing potentially risky actions, Wiz found these safeguards rendered "substantively empty"

1

. The agents recognized that symlinks pointed to dangerous targets, yet the confirmation prompts shown to users hid the true destination, displaying only harmless file names.

Source: InfoWorld

Source: InfoWorld

Anthropic Claude Code demonstrated the worst handling of this issue. Its internal reasoning correctly identified that "project_settings.json is actually a zsh configuration file," yet the prompt presented to users simply asked: "Make this edit to project_settings.json?"

1

. This creates an informed-consent bypass where developers approve actions based on misleading information, believing they're editing local configuration files while actually modifying critical system files.

Some tools proved even more vulnerable. Windsurf writes files to disk before Accept and Reject buttons appear, transforming the approval prompt into a mere undo button after the damage is done. Augment showed no dialog whatsoever, silently reading AWS credential files outside the project scope

5

.

Vendor Responses Split on Responsibility

The response from affected vendors reveals a fundamental disagreement about threat model boundaries in AI-driven development tools. Amazon, Cursor, and Google treated the GhostApproval vulnerability as critical or high-severity. Amazon and Cursor have already issued CVE trackers and deployed patches, while Google fixed Antigravity in May

1

. Augment and Windsurf acknowledged the vulnerability report but haven't patched the issue or warned users at publication time

4

.

Anthropic took a starkly different position, calling the scenario "outside our threat model" and closing the ticket as "informative"

1

. The company argued that when users confirm they trust a directory before starting a session and then approve a file operation, responsibility falls on the developer rather than the AI agent. Anthropic later stated that Claude Code's symlink warning shipped in early February, before Wiz's report, as proactive hardening rather than a direct fix

5

.

Broader Pattern of AI Agent Vulnerabilities

The GhostApproval vulnerability isn't an isolated incident but part of a concerning pattern. In May, Adversa AI published SymJack, documenting the same symbolic link and approval pattern affecting six coding agents including Claude Code, Cursor, GitHub Copilot, and Grok Build

5

. The fact that two independent research teams discovered identical vulnerabilities points to a shared design weakness rather than individual vendor oversights.

Source: The Register

Source: The Register

Separately, the AI Now Institute published research on an attack called Friendly Fire that exploits AI coding agents tricked into running malicious code when scanning open-source repositories for security holes

3

. This attack works against Anthropic Claude Code and OpenAI's Codex when running in autonomous modes that approve their own commands, hijacking the exact defensive security work these tools are marketed to perform.

Enterprise Risk and Trust Boundaries

For enterprises rushing to deploy AI coding agents, these vulnerabilities represent serious threats. "AI coding tools are routinely granted deep access to enterprise codebases and cloud environments," Wiz threat researcher Maor Dokhanian explained. "In the race to ship autonomous features, trust-boundary gaps emerge between users, AI agents, and local filesystems. Classic security principles - like resolving symlinks before acting on paths - cannot be overlooked as we embrace new AI architectures"

1

.

While there's no indication the GhostApproval vulnerability is being actively exploited in the wild, the attack surface is substantial. The proof-of-concept demonstrates how a simple malicious repository can walk an agent past its own safety prompts, with one injection working unchanged across multiple vendors and models

3

.

Wiz recommends developers run agents with limited file access or inside containers, review README files and hidden config files before allowing automated setup, and check sensitive files like shell startup scripts and SSH keys after working with unfamiliar repositories

5

. For tool makers, the guidance is direct: resolve symlinks and show real destinations before requesting approval, flag any writes landing outside project folders, and never modify files until users have actually confirmed.

The debate over where responsibility lies—protecting users from deceptive repos versus treating vigilance as the developer's job—will likely intensify as AI coding agents gain deeper access to enterprise environments and autonomous capabilities expand.

Today's Top Stories

© 2026 TheOutpost.AI All rights reserved