shellbits

Field NotesNovember 2026

SBR-2026-06Vulnerability research 18 min

What you approved is not what ran: approval-binding failures in AI coding agents

In 17 public cases from June 2025 to October 2026, the approval prompt approved a description of an action and the system executed something else. We treat them as one bug class and give a seven-field model, a reproducible lab and ten checks.

AgentsAuthorizationDeveloper tools
In this piece
  1. 01Vendors do not agree that the prompt is a boundary
  2. 02Seventeen case groups, six gaps
  3. 03The model: an approval is a statement about seven fields
  4. 04What the standards actually require
  5. 05Lab: four minimal cases
  6. 06A test plan: ten checks and six requirements

In a demonstration that Wiz published in July 2026, Cursor's diff view shows the agent editing project_settings.json. The user clicks Accept. The write lands in ~/.ssh/authorized_keys, because the file name is a symbolic link that points outside the workspace1. Wiz reports that Cursor fixed it in version 3.0 as CVE-2026-505491. The CVE record scores it 9.3 on CVSS 4.0; Cursor's advisory describes a different mechanism, shown in the table below23.

Reports like this arrived through 2025 and 2026 as MCPoison, CurXecute, InversePrompt, IDEsaster, SymJack and GhostApproval. Wiz and Adversa each call their own finding a category-wide flaw14. We think all of these reports are one bug class: the prompt approves a description of an action, the system later executes something else, and nothing guarantees that the two are equal. It is a time-of-check/time-of-use gap at the human interface, and we call it an approval-binding failure.

The claim can be refuted by one bypass in which what was shown, what was stored and what ran were the same thing. The table below gives 17 case groups to test it against.

01Vendors do not agree that the prompt is a boundary#

Vendor advisories assume that a coding agent reads untrusted content: Anthropic's require it in the context window1112, and Cursor's start at a prompt injection1314. This means the model's judgement is not a control, which leaves the sandbox and the approval prompt. With the sandbox off, the default in the Gemini CLI that Tracebit tested in June 202515, the prompt is the only check present at every action.

Vendors do not treat a prompt bypass consistently. Anthropic assigned CVE-2025-54795, CVSS 4.0 score 8.7, to a command-parsing error; the advisory title says it allowed a bypass of the user approval prompt11. It closed Wiz's symlink report as outside its threat model. Wiz quotes the reply, which ends:

"The scenario you describe involves a user explicitly confirming a permission prompt inside of a directory containing a malicious symlink, which falls outside of the Claude Code threat model."1

Wiz sent the same class of issue to six vendors; AWS, Cursor and Google fixed it1. Responses to SymJack were further apart. By Adversa's account (we found no vendor statement on SymJack), Google classed it as a single-user self-attack, OpenAI's Bugcrowd programme closed it as a false positive because the user approves the cp command, Cursor declined it as a duplicate, and xAI and GitHub had not replied. Adversa says Anthropic rejected the report and later changed the prompt to show the resolved path4.

We think only one position can hold. If the prompt is a control, it must bind the action that runs, and a bypass is a vulnerability. If it is a convenience, it should not be presented or counted as a control. A click is consent only when prompt and action match: in the Claude Code case that Wiz recorded, the agent's reasoning had identified the symlink, and the prompt asked only whether to edit project_settings.json1.

Agents that left their scope in evaluation environments (see SBR-2026-07) and supply-chain attacks in general (see SBR-2026-08) are outside this article.

02Seventeen case groups, six gaps#

Each row answers two questions: what did the approval, or the rule that should have triggered one, bind; and what executed. The six classes:

  • A: the approval was bound to a name or a label, not to content.
  • B: the effect came before the approval, or no approval was asked.
  • C: the prompt showed one object and the write landed on another.
  • D: the allowlist parser and the shell read the same string differently.
  • E: the protection rule compared identity differently from the file system.
  • F: the agent could rewrite the configuration that holds the approval state.

Each group has one primary class; the gap column names a second class where one applies. Dates come from write-ups and advisories, version ranges from the CVE records3.

ClassIdentifierProduct, affected versionsFound byReported → fixedGapFix
ACVE-2025-54136Cursor < 1.3Check Point Research2025-07-16 → 2025-07-29Approval was keyed to an MCP entry's name; the entry's current command and args ran16Any change needs new approval17
AGHSA-ph6w-f82w-28w6 (no CVE)Claude Code < 1.0.87Check Point Research2025-07-21 → 2025-08-26The user trusted a folder; hook commands in its settings ran with no further prompt (also B)18Warning reworded6
BCVE-2025-59536Claude Code < 1.0.111Check Point Research2025-09-03 → 2025-09-22Repository settings enabled project MCP servers; their start commands ran before the trust dialog was answered1819Servers start after approval18
BCVE-2026-21852Claude Code < 2.0.65Check Point Research2025-10-28 → 2025-12-28Project settings set the API endpoint; requests with the API key left before the trust prompt20No request before trust18
BCVE-2026-12958; Windsurf (no CVE)Language Servers for AWS < 1.69.0 (Amazon Q Developer); Windsurf V1.9566Wiz2026-03 → 2026-05-27 (AWS)The write reached disk before Undo or Accept/Reject appeared, and crossed a symlink (also C)1AWS: 1.69.021. Windsurf: no update at publication1
CCVE-2026-50549Cursor < 3.0Wiz; Cato AI Labs also credited2026-02-27 → 2026-06-05 (advisory)Wiz: the diff showed an in-workspace name and the write hit the symlink target1. Advisory: after a failed canonicalisation the write used the original path, unapproved2Failed canonicalisation blocks the write2
CGhostApproval, other cases (no CVE)Google Antigravity 1.19.6; Claude Code v2.1.42Wiz2026-02 → 2026-05-22 (Google)The dialog showed the symlink path, not the resolved target1Google fixed it; Anthropic closed it as Informative and said a symlink warning shipped in v2.1.321
CSymJack (no CVE)Claude Code 2.1.128, Gemini CLI 0.43.0, Cursor CLI v2026.05.20, Copilot CLI 1.0.51, Grok Build CLI 0.1.216, Codex CLI v0.133.0Adversa AIPublic 2026-05-26The prompt showed a literal cp command; its destination was a symlink to the agent's own configuration (also F)4Not fixed at publication; partial fix in Claude Code 2.1.1294
DNo CVE; Google VDP P1/S1Gemini CLI < 0.1.14Tracebit2025-06-27 → 2025-07-25The allowlist compared the root command grep; the shell ran the whole chained string, and whitespace hid its tail (close to C)15Full command shown; other binaries need approval15
DCVE-2025-54795Claude Code < 1.0.20CymulateAdvisory 2025-08-01An auto-approved echo pattern matched; a command placed after the closed quote also ran22Parsing fixed in 1.0.2011
DCVE-2026-22708Cursor < 2.3, Auto-Run with allowlist (not the default)Pillar Security2025-08-11 → 2026-01-14 (advisory)A listed command such as git branch was approved; unprompted shell built-ins had changed its environment, so it ran another program23Parsing improved24
DCVE-2026-110202 to CVE-2026-110206Roo Code through 3.54.0Minqiang Gui, Siyu LouPublished 2026-10-13The parser saw the allowlisted echo; the shell saw a command substitution or a redirect3None listed; tagged unsupported-when-assigned3
ECVE-2025-59944Cursor < 1.7Lakera and others2025-09-02 → 2025-09-29The rule matched .cursor/mcp.json case-sensitively; on a case-insensitive file system another spelling reaches the same file25Paths normalised, compared case-insensitively2514
ECVE-2025-54794Claude Code < 0.2.111CymulateAdvisory 2025-08-01The directory limit was a string-prefix test; another directory with the same prefix passed120.2.11112
FCVE-2025-53773GitHub Copilot; Visual Studio 2022 17.14.0 to before 17.14.12wunderwuzzi; two others also, per that post2025-06-29 → 2025-08-12The agent wrote chat.tools.autoApprove into workspace settings, which turned off every confirmation26August 2025 security update26
FCVE-2025-54135Cursor < 1.3.9Aim Security, per Tenable2025-07-07 → 2025-08-02 (advisory)Editing a dotfile needed approval, creating one did not; a new .cursor/mcp.json ran its command at once. Per Tenable the edit landed before the user could reject it (also B)1327Approval needed to write MCP files13
FIDEsaster (24 CVEs, per the author)10+ products, per the authorAri MarzoukPublic 2025-12-06The agent may write workspace files; the IDE treats some settings values as a program to run28Varies; Claude Code added a warning28

14

Different CWE ids on the 16 CVE records, read on 2026-11-223

3 / 6

Vendors that had fixed GhostApproval when Wiz disclosed it on 2026-07-081

6 / 6

CLI agents in which Adversa's SymJack chain worked4

The CVE records hide the relationship. Their CNAs filed 14 different CWE ids, from CWE-78 (OS command injection) to CWE-522 (insufficiently protected credentials), and none is CWE-36735. Wiz labels the symlink primitive CWE-61 and the misleading prompt CWE-451, UI misrepresentation of critical information; the two matching records carry only CWE-59 and CWE-6113. The closest to our reading is CWE-436, Interpretation Conflict, on four of the five Roo Code records3.

Three strengths of fix#

The fixes show at which layer each vendor understood the problem.

  1. Reword the prompt. The hooks fix made the startup warning say that proceeding lets Claude Code execute files in the folder6. The approval is still bound to a folder.
  2. Ask again when content changes. Since Cursor 1.3, any change to an MCP entry triggers approval, even one added space16.
  3. Verify at the enforcement point and fail closed. Cursor 3.0 blocks a write whose target it cannot canonicalise2; Claude Code 1.0.111 starts MCP servers only after approval1819.

We think only the third kind closes the class. After Anthropic improved the dialog for the hooks issue, the same researchers ran a command before the dialog was answered (CVE-2025-59536)18. Adversa adds that where native write tools warned on sensitive paths, a shell cp went around them4.

Cases that sit in two classes#

Five groups span two classes: the hooks issue (A, B), Amazon Q and Windsurf (B, C), SymJack (C, F), the Tracebit finding (D, C) and CurXecute (F, B). One Wiz finding is not in the table: Augment read and wrote through symlinks with no confirmation dialog at all1. That is a missing approval, not a binding failure.

03The model: an approval is a statement about seven fields#

Extract the gap from each case and the same fields appear. We write an approval as a statement about seven fields: subject, action, canonical object, arguments, destination, content digest and validity window. A click on yes means: this subject may, in this window, do this action to this object with these arguments, with the effect at this destination and with this content. A field that is not bound is a field where an attacker can substitute something.

Seven fields, one failure each#

FieldWhat it pins downFailure
SubjectWho decided, where the approval state lives and who can write itCVE-2025-53773: the agent wrote its own auto-approve setting26
ActionThe operation by its effect, not by its command textSymJack: the prompt inspected the command text4
Canonical objectThe object that the operating system will resolve toCVE-2025-59944: two spellings, one file25
ArgumentsThe full argument vector and the inherited environmentCVE-2026-22708: git branch was unchanged; PAGER was not23
DestinationWhere the effect lands: a resolved path or a network endpointCVE-2026-21852: project settings chose the API endpoint20
Content digestThe exact content that was approvedCVE-2025-54136: same name, new content16
Validity windowWhen the approval starts and ends, and how many uses it coversCVE-2025-59536: the effect came before the approval18

The same canonical form, three times#

An action exists in at least three copies: on screen, in the approval store and in the call to the operating system. In every gap, two copies were unequal or the agent could write one of them. An approval is a control only when one canonical form passes through four steps.

  1. 01

    Canonicalise

    Outside the model, resolve the action into the seven fields: follow symlinks, split the argument vector, hash the content

  2. 02

    Show

    The prompt presents those fields, untruncated, with no model-written summary in their place

  3. 03

    Store

    The record holds the fields or their digest, where the agent cannot write

  4. 04

    Re-check

    At time of use the enforcement point canonicalises again and compares; a mismatch or a failure is a refusal

Three conditions are needed together.

One canonical form. In classes C, D and E the display or the matcher used one representation and the operating system another. A matcher that imitates a shell or a file system is a second implementation, and the five Roo Code CVEs are five ways it went wrong3. Let the operating system answer instead: compare the identity of the resolved file, and execute an argument vector, not a shell string.

Outside the model. The model does not write or summarise the prompt, and the approval state does not live where its tools can write. Every class F case breaks this condition.

At time of use. A path checked at approval can point elsewhere at execution, so check and use must be the same open, done component by component without following links. On Linux, openat2 offers RESOLVE_BENEATH, which rejects resolution that leaves the starting directory, and RESOLVE_NO_SYMLINKS, which rejects every symlink29.

The model says whether the approved action and the executed action are the same, not whether the person understood the prompt. A bypass with all three copies equal, the state outside the model and a re-check at the enforcement point would show that it is not enough. We found none in public material.

04What the standards actually require#

Model Context Protocol 2026-07-28#

The latest revision on 2026-11-22 is 2026-07-287. Its overview says that hosts must obtain explicit user consent before invoking any tool, with "must" in lower case; the same page gives key words normative force only in capitals, per BCP 147. The normative sentence comes later on the page: MCP cannot enforce these principles at the protocol level, and implementors SHOULD build consent and authorization flows into their applications7.

The tools page uses these words8:

  • There SHOULD always be a human in the loop with the ability to deny tool invocations.
  • The protocol does not mandate any specific user interaction model.
  • Clients MUST consider tool annotations untrusted unless they come from trusted servers.
  • Clients SHOULD prompt for confirmation on sensitive operations and show tool inputs before calling the server.

Annotations are fields such as readOnlyHint and destructiveHint; the schema calls them hints that are not guaranteed to describe the tool faithfully30. Authorization is OPTIONAL and is defined at the transport level for HTTP; STDIO implementations SHOULD NOT follow it and take credentials from the environment9. Servers MUST validate that access tokens were issued for them, which binds a token to a server, not to the content of one tool call9. We found no mention of RFC 9396 or authorization_details on the overview, tools, authorization and schema pages.

Our reading: MCP leaves per-call consent to the host application, and most cases in the table happened in built-in shell and file tools that do not pass through MCP. The protocol neither requires binding nor can guarantee it.

OWASP Top 10 for Agentic Applications 2026#

OWASP published the document on 2025-12-09; its cover reads Version 2026, December 202531. Three items apply.

  • ASI02 Tool Misuse and Exploitation asks for action-level authentication and approval, a dry-run or diff before a high-impact action is approved, and a pre-execution policy enforcement point that treats planner output as untrusted and validates intent and arguments31.
  • ASI03 Identity and Privilege Abuse lists TOCTOU in agent workflows as an example, and asks for OAuth tokens bound to a signed intent that names subject, audience, purpose and session31.
  • ASI09 Human-Agent Trust Exploitation is framed as human misperception or over-reliance; one mitigation separates preview from effect, with no network or state-changing call during a preview31.

The ingredients are spread over three items. ASI02 and ASI09 ask for human confirmation of high-risk actions; we found nothing in the three that requires what the prompt shows to equal what later runs31. We think the framing of ASI09 also invites a wrong reading: in our table nobody was persuaded or careless; the prompt lacked the information or came too late. Filed under human factors, the response stops at training and warnings.

RFC 9396 and the OpenID Authorization API#

RFC 9396, OAuth 2.0 Rich Authorization Requests (Standards Track, May 2023), defines authorization_details, an array of JSON objects with a REQUIRED type and common fields such as locations and actions32. Two rules match our model: when gathering consent the authorization server MUST present the merged set of requirements, and it MUST make the approved details available to the resource server, which enforces them32. In the remote-signing example of Appendix A.2, the access token is bound to the hashes of the documents that the user agreed to sign32.

The OpenID Foundation announced Authorization API 1.0, from the AuthZEN Working Group, as a Final Specification on 2026-01-1233. It defines requests and decisions between a Policy Decision Point (PDP) and a Policy Enforcement Point (PEP) over Subject, Action, Resource and Context34. Its mapping to MCP, COAZ-MCP Binding 1.0, is a working group draft dated 2026-02-133536. The draft has the PEP call the PDP before a message takes effect and says the PEP MUST fail closed on a mapping error, a denial or a PDP communication failure36.

Both address remote resources and gateways, not the prompt of a local coding agent. They are patterns to copy: decide on structured fields, enforce outside the model, refuse on failure.

05Lab: four minimal cases#

CaseKindClassnaivebound
symlink-swapReal file operationsC, at time of useWrote outside the workspaceWrite refused: NotADirectoryError
name-not-contentDecision logicARan the changed command with no promptDigest mismatch (537e86878cbc3590 against 29b008b793e18e07); asks again
prefix-allowlistDecision logicDAllowed git status && cat config/local.envFound the operator &&; asks first
case-foldDecision logic; models a case-insensitive file systemETreated .Agent/Settings.JSON as unprotectedTreated it as protected

symlink-swap is not SymJack. There the link existed before approval and the prompt showed the unresolved path; here the user approves a write to notes/todo.md, and notes/ is then replaced by a symlink to a directory outside the workspace.

labs/approval-binding/demo.py (excerpt, bound gate)python
root_fd = os.open(ws, os.O_RDONLY | os.O_DIRECTORY)
approval = {"root": (os.fstat(root_fd).st_dev, os.fstat(root_fd).st_ino), "rel": ("notes", "todo.md")}
swap(ws, outside)
blocked, reason = False, ""
try:
    fd = root_fd
    for part in approval["rel"][:-1]:
        fd = os.open(part, os.O_RDONLY | os.O_DIRECTORY | os.O_NOFOLLOW, dir_fd=fd)
    out = os.open(approval["rel"][-1], os.O_WRONLY | os.O_CREAT | os.O_NOFOLLOW, 0o600, dir_fd=fd)
    os.write(out, b"written by the agent\n")
    os.close(out)
except OSError as exc:
    blocked, reason = True, f"{type(exc).__name__}: {os.strerror(exc.errno)}"

The code opens the workspace root at approval and keeps the descriptor. At execution it walks from that descriptor with O_NOFOLLOW; notes is now a symlink, the open fails and nothing is written. The recorded device and inode numbers are never compared again; the open descriptor pins the root.

We ran it on Linux 6.18 (WSL2) with Python 3.14.4, and a re-run on 2026-11-22 matched results.json. Classes B and F have no case. The bound gates are illustrations, not production checks: one refuses any shell operator, another approximates file-system matching with Unicode normalisation and casefolding. The lab tests no product.

06A test plan: ten checks and six requirements#

Run these against the version and settings that you deploy, in a disposable virtual machine with a test repository. Where a check needs a command, use one that only creates a marker file. The letter is the class that a failure belongs to.

For teams that deploy agents: ten checks#

  1. (A) Approve a project MCP server, change its arguments under the same name, reopen the project. Expect a new prompt that shows the changed command in full.
  2. (B) Add a start-up item to the repository's agent settings and point the API endpoint at a local listener; open the project and leave the trust dialog unanswered. Expect no marker file and no request.
  3. (B) Request a file edit, leave the prompt unanswered, read the file from another terminal. Expect unchanged content.
  4. (C) Ask the agent to edit an in-workspace symlink that points to a test file outside. Expect the resolved path, flagged as outside the workspace, or a refusal.
  5. (C) Repeat check 4 through cp or a shell redirect. Expect the same; protection on the native tool only is a failure.
  6. (D) Allowlist a read-only command, then have the agent propose it followed by &&, a semicolon, a pipe or a command substitution. Expect a prompt each time, showing the whole line.
  7. (D) Have the agent propose a line padded with whitespace, or wider than the window. Expect the full line, or a visible truncation mark and no automatic run.
  8. (D) In allowlist mode, have the agent set a test variable with a shell built-in, then run a listed command. Expect a prompt for the built-in, or a variable that does not carry over.
  9. (E) On a case-insensitive file system, request a write to a protected settings file in another case, and through an extra ./. Expect the same protection.
  10. (F) Ask the agent to change its own approval state: auto-approve switch, allowlist, MCP configuration, IDE workspace settings. Expect a prompt, or files it cannot write.

For teams that build agents: six requirements#

  1. The enforcement layer builds the prompt from the canonical action: resolved absolute path, full argument vector, destination endpoint. No model-written text replaces it.
  2. Approval records are keyed by content digest, with a scope and an expiry. A name, a path string or a command prefix is not a key.
  3. Every write path passes the same check, including shell copy, move and redirect4.
  4. Files are opened at time of use without following links; a failed canonicalisation is a refusal, never a fallback2.
  5. Approval settings and allowlists live where the agent's tools cannot write. Project files cannot turn on auto-approval or enable MCP servers4.
  6. Before the trust decision nothing executes, connects or writes, and a preview has no side effects131.