The Research Report
SymJack: The Approval Prompt Is Lying to You
A symlink attack disclosed on May 26, 2026 tricks the human approval step in AI coding agents into overwriting their own configuration files. The result is remote code execution on the next restart. The attack works against six major tools. It is not a bug in any single product. It is a design flaw in the entire category.
What SymJack Does
SymJack, named by Adversa AI researcher Rony Utevsky, hijacks the symlink resolution that happens after a user clicks "approve." The user sees a harmless file copy. The kernel writes to the agent's config directory. The next time the agent starts, it runs attacker code with full user privileges.
The attack chain is simple but effective.
First, the attacker controls a repository that the victim clones. That repo contains a project instruction file such as CLAUDE.md, AGENTS.md, GEMINI.md, copilot-instructions.md, or CURSOR.md. The agent auto-ingests this file on startup and treats it as trusted guidance from the developer.
The instruction file poses as a documentation generator. It tells the agent to copy a couple of media files from one folder to another. The agent requests approval for a shell command like cp media/vid0.mp4 docs/vid-settings.mp4. The user sees a video file copy and approves it.
But the "destination" file is a symbolic link committed into the repo. It points to the agent's own configuration file, such as .claude/settings.json or .mcp.json. When the kernel executes the copy, it follows the symlink and writes the attacker's payload straight into the config. The payload is a JSON configuration file disguised with a media file extension. It registers a malicious MCP server whose startup command runs whatever the attacker wants.
On the next restart, the planted server spawns. The attacker's code runs unsandboxed. It can steal SSH keys, cloud tokens, browser sessions, or destroy production assets.
The Six Affected Tools
Adversa AI confirmed the SymJack chain against six independent products from six companies:
- Claude Code (2.1.128, partial patch in 2.1.129)
- Gemini CLI / Antigravity CLI (0.43.0 / 1.0.2)
- Cursor Agent CLI (v2026.05.20)
- GitHub Copilot CLI (1.0.51)
- Grok Build CLI (0.1.216)
- OpenAI Codex CLI (v0.133.0)
The flaw is architectural. All six tools made the same four design choices. Each one auto-ingests a project instruction file as trusted input. Each one exposes a raw shell as an escape hatch that sidesteps the guardrails on native write tools. Each one renders the per-action approval against the literal command string rather than the resolved effect. And each one loads and runs MCP servers from config on startup.
When one tool has a flaw, you patch the tool. When every tool in a category shares the flaw, the category has a broken design assumption.
CI Runners: Zero Clicks Needed
On a developer laptop, the attack needs one approval click. On continuous integration runners, it often needs none.
CI runners commonly auto-trust their workspace and run agents in non-interactive modes that approve tool calls automatically. Drop the same malicious files into a pull request, and the chain executes end to end with no operator present. The blast radius is worse than on a laptop. CI runners hold deploy keys, signing material, cloud credentials, and registry tokens. A single malicious pull request can exfiltrate all of them before any human reviews the change.
This is a supply chain attack with a coding agent as the delivery mechanism.
Vendor Responses: A Mixed Bag
Adversa AI disclosed the issue to all six vendors through their security programs. The responses show how six companies can look at the same evidence and reach different conclusions.
Anthropic rejected the report as out of scope on HackerOne. But a few weeks later, Claude Code was quietly hardened. Version 2.1.129 now resolves symlinks before asking for approval and shows the real destination path in the prompt. The report was rejected on paper and fixed in practice.
Google declined the report for Gemini CLI and Antigravity CLI. The company classed it as a single-user self-attack and treated explicit user approval as intended behavior.
Cursor declined the report as a duplicate of an existing symlink issue.
xAI and GitHub had not responded at the time of publication.
OpenAI closed the Codex CLI report through its Bugcrowd program. The company called the attack theoretical and cited the user approval step as proof that no security boundary was crossed. That reasoning is the bug. The approval is informed only if the prompt tells the user what the copy actually does. It does not.
Why the Guardrails Miss
Five separate controls each look at a different representation of the same write. None resolve the symlink.
The workspace trust dialog gates the session, not the operation. The agent's native write tools have path-sensitivity checks, but the attacker uses a raw shell cp command to bypass them. The approval prompt inspects the command text, not the real effect. The agent does not parse the contents of a media file before moving it. And the config files ship empty in the repo, so a pre-run audit shows nothing suspicious.
The user reasons correctly about the wrong facts. The tool never tells them that the copy rewrites authentication config and runs code on restart.
How to Protect Your Developers and Pipelines
You cannot wait for six vendors to converge on a fix. You need controls that do not depend on the agent being honest about its own actions.
Resolve symlinks before any permission decision. This is the single highest-value fix. Claude Code shipped it. Every other vendor should follow.
Treat shell file operations as first-class writes. Commands like cp, mv, install, tee, and redirections should face the same path-sensitivity checks as native write tools.
Show the canonical destination in the approval prompt. The user must see where the file will actually land, not the literal argument string.
Block sensitive config keys from project-scoped files. Settings that enable MCP execution should not be settable by a file inside the repo.
Scan repositories for dangerous patterns. Flag tracked symlinks that target config files. Flag instruction files with a high blank-line ratio and a single deep include. Fail pull requests that modify agent config, MCP definitions, or instruction files.
Isolate CI runners that handle untrusted pull requests. Do not let them hold production secrets. Treat any host that has run a coding agent against an untrusted repo as potentially compromised. Rotate SSH keys, cloud tokens, and signing material.
The Bigger Picture
SymJack is the second attack in this thread from Adversa AI. In early May 2026, the same researcher published TrustFall. That attack showed that Claude Code, Gemini CLI, Cursor CLI, and GitHub Copilot CLI execute project-defined MCP servers the moment a developer accepts the folder trust prompt. TrustFall relied on a repo shipping a populated config that the trust dialog fails to display.
SymJack raises the bar. The config files are empty in the repo. The malicious settings are added after the trust prompt using the victim's own approved file copy. The human approval step, the key control these tools lean on for safety, is the thing being defeated.
The real attack surface for AI coding agents is not the model. It is the config file. Every attacker who has broken these tools went for the credential, not the model.
Suggested title: SymJack: How a Symlink Hijacks Your AI Coding Agent
Word count: 1,098
Fact-check notes:
- Disclosed May 26, 2026 by Adversa AI researcher Rony Utevsky. Source: Adversa AI blog
- Six affected tools confirmed: Claude Code, Gemini CLI, Antigravity CLI, Cursor Agent CLI, GitHub Copilot CLI, Grok Build CLI, OpenAI Codex CLI. Source: Adversa AI blog
- Claude Code partial patch in version 2.1.129 resolves symlinks before approval prompt. Source: Adversa AI blog
- Google declined report. Cursor declined as duplicate. xAI and GitHub had not responded. OpenAI closed report as theoretical. Source: Adversa AI blog
- Anthropic HackerOne rejection cited program carve-out for symlinks and aliased commands. Source: Adversa AI blog
- Proof of concept available at github.com/adversa-ai/research/tree/main/artifacts/symlink-to-rce. Source: Adversa AI blog
- TrustFall disclosed May 7, 2026 by same researcher. Source: Adversa AI blog
- No official CVE or CVSS score assigned at time of writing. Severity is treated as critical/architectural by researchers and SecurityWeek coverage.
- SecurityWeek coverage confirms supply chain attack angle. Source: SecurityWeek
- VentureBeat coverage from April 30, 2026 confirms pattern: "Every attacker went for the credential, not the model." Source: VentureBeat