Skip to content

Prompt injection attacks against agentic coding assistants: a systematic analysis of vulnerabilities in the skills, tools, and protocol ecosystemPrompt Injection Attacks on Agentic Coding Assistants: A Systematic Analysis of Vulnerabilities in Skills, Tools, and Protocol Ecosystems

arXiv· arXiv:2601.17548· Narek Maloyan, Dmitry Namiot·Indexed by this site · 2026-10-12· Originally publishedAttacks

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

The authors synthesize the prompt injection literature for programming assistants; in Table III, Protect AI's adaptive success rate is 93%, and Model Armor's is 78%.

Questions
Agentic coding assistants can read files, execute commands, and connect to external tools via MCP, with instructions and external data sharing the same pathway. The authors believe indirect prompt injection can alter behavior without direct user interaction, potentially leading to code execution or credential exfiltration.
Methods
This is a systematization of knowledge; the authors did not independently reproduce. Attacks are classified by delivery vector, modality, and propagation behavior, with rule files, MCP tool poisoning, and skill chains organized at a conceptual level. Defense-in-depth includes signatures, permission reduction, runtime validation, sandboxing, provenance tracking, and human gating; this paper does not measure effectiveness.
Experiments and results
Table III: Protect AI adaptive success rate 93%, Model Armor 78%. MCPSecBench writes that 85%+ of attacks break at least one platform. Table IV marks Cursor as Critical and Claude Code as Low.
Limitations and future work
The authors state in VIII.F: findings may be outdated at publication; major platforms are closed-source, so evaluation is black-box; benchmarks may not reflect highly motivated attackers; mainly static defenses are evaluated; published attacks may have selection bias. The methodology states that independent reproduction was not performed. Table III does not specify the target model or sample size.
Experimental setupMCPSecBench · 攻击成功率、自适应攻击下的绕过率
Benchmarks
MCPSecBench
Metrics
攻击成功率自适应攻击下的绕过率
AI summaryA systematization of knowledge (SoK) paper analyzes prompt injection attacks against agentic coding assistants such as Claude Code, GitHub Copilot, and Cursor, proposing a three-dimensional taxonomy based on delivery vectors, attack modalities, and propagation behaviors. The authors aggregate 78 studies from 2021 to 2026, cataloging 42 attack techniques covering input manipulation, tool poisoning, protocol exploitation, multimodal injection, and cross-source context poisoning. The paper claims that with adaptive attack strategies, the attack success rate against current state-of-the-art defenses exceeds 85%, and analyzes 18 defense mechanisms, noting that most provide less than 50% mitigation against adaptive attacks. The authors also provide exploitation chains for Claude Code skills and Copilot Extensions, and propose a defense-in-depth framework that includes encrypted tool identity, capability scope limitation, runtime intent validation, and sandboxed execution.

A systematization of knowledge (SoK) paper analyzes prompt injection attacks against agentic coding assistants such as Claude Code, GitHub Copilot, and Cursor, proposing a three-dimensional taxonomy based on delivery vectors, attack modalities, and propagation behaviors. The authors aggregate 78 studies from 2021 to 2026, cataloging 42 attack techniques covering input manipulation, tool poisoning, protocol exploitation, multimodal injection, and cross-source context poisoning. The paper claims that with adaptive attack strategies, the attack success rate against current state-of-the-art defenses exceeds 85%, and analyzes 18 defense mechanisms, noting that most provide less than 50% mitigation against adaptive attacks. The authors also provide exploitation chains for Claude Code skills and Copilot Extensions, and propose a defense-in-depth framework that includes encrypted tool identity, capability scope limitation, runtime intent validation, and sandboxed execution.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Agentic programming assistants mix instructions and external data in the same context, and prompt injection can expand impact through skills, tools, and MCP.

    Agentic coding assistants put instructions and external data in the same pathway, so prompt injection can become file reading, command execution, or data exfiltration via skills, tools, and MCP.

    • Scenario: The authors state that Claude Code, GitHub Copilot, Cursor, and OpenAI Codex CLI can read files, execute shell commands, access the internet, and modify codebases, and that MCP is becoming the de facto standard for connecting external resources. The authors state that major coding assistants have more than 30 CVEs, with impacts including arbitrary code execution, credential theft, and system compromise.
    • Gap: The abstract states that most defenses mitigate complex adaptive attacks by less than 50%; the introduction states that 12 defenses exhibit fragile patterns against adaptive attacks. Table III lists bypass rates, and not all six rows are above 85%.
    • Observation: The authors believe LLMs cannot distinguish between instructions and data, and instructions in external content can alter behavior; with system privileges, this can occur without direct user interaction.
    • This paper: SoK. The authors propose a three-dimensional classification of delivery vector, modality, and propagation behavior, relay figures from the literature, describe exploitation chains for Claude Code skills and Copilot Extensions, and provide six-layer defense-in-depth. The figures are mainly cited from MCPSecBench, IDEsaster, and Nasr et al., and the authors state they did not independently reproduce.
    • Threat model:
      • Goals: Data exfiltration, code injection, privilege escalation, denial of service, persistence.
      • Capabilities: Level 1 can write repository issues, PRs, comments, and public documentation web pages, but cannot access private repositories or authenticated systems. Level 2 can also publish MCP servers, skills, or extensions. Level 3 additionally has man-in-the-middle and DNS manipulation.
      • Limitations: Cannot modify system prompts, cannot intercept the main channel between the user and the agent, and cannot access local resources not exposed by the agent.
      • Boundaries: User instructions should outrank external content; tool outputs should be treated as data; tools should not hijack each other; old sessions should not affect current security. The authors state that 73% of tested platforms fail to adequately enforce at least one boundary, without giving the number of platforms.
  2. What related research exists?

    Related work covers prompt injection, agent evaluation, MCP, and detection defenses; the empirical figures in this paper are relayed, not new experiments.

    Related work is summarized according to Section IX and the introduction. The figures below are all the authors' relay of cited works; this paper has no comparative experiments.

    Prompt injection basics

    • Terminology and indirect injection: Perez and Ribeiro (2022) proposed the terminology and performed basic attacks. Greshake et al. (2023) demonstrated indirect injection: placing malicious content in external sources that the agent processes.
    • Formalization and example libraries: HouYi writes attacks as pre-built prompts, context splitting, and malicious payloads; 31 of 36 real-world applications are attackable. TensorTrust crowdsources over 500,000 attack-defense examples; HackAPrompt records 29 techniques.

    Agents, MCP, and coding assistants

    • Agent evaluation: Liu et al. use ToolEmu, an LM-simulated sandbox, to identify risks. InjecAgent evaluates 30 LLM agents, with vulnerability rates up to 47% under enhanced attacks. AgentDojo has 97 tasks and 629 security tests. ASB's attack success rate is up to 84.3%.
    • MCP: The MCP security SoK separates adversarial threats and cognitive security harms. Hou et al. classify by lifecycle into creation, deployment, operation, and maintenance, including 16 activities. MCPSecBench sets 17 attack categories and 4 surfaces; the authors relay that 85%+ break at least one major platform.
    • Coding assistants: IDEsaster records 30+ vulnerabilities. Rules File Backdoor exploits editor rule files. XOXO uses semantically equivalent modifications for cross-source context poisoning. Schuster et al. study code completion poisoning; Pearce et al. evaluate the security of code contributed by Copilot.

    Defenses

    • Hierarchy and channels: Wallace et al. propose instruction hierarchy, prioritizing instructions by source. The authors write in Section VI that it can reduce attacks but not eliminate them. StruQ separates prompt and data channels; Section VI writes an attack success rate of <2%, and related work qualifies <2% as optimization-free attacks.
    • Optimization and isolation: SecAlign uses preference optimization to reduce the attack success rate from 96% to 2%. Related work writes that Progent reduces from 41.2% to 2.2%, without giving the baseline name. The authors relay that CaMeL achieves provable security on 77% of AgentDojo tasks.
    • Detectors: Related work states that the 12 defenses evaluated by Nasr et al. have attack success rates over 90%. Table III lists only 6, with adaptive success rates including 78% and 82%, not all above 90%. PromptArmor has false positives/false negatives <1% and post-defense success rate <1%; the authors state that its evaluation against adaptive attacks remains limited.

    Jailbreaks

    • GCG: Universal adversarial suffix, attack success rate 88%, and the paper writes that it transfers across models.
    • Automated jailbreaks: Wei et al. frame safety training failures as competing objectives and generalization mismatches. PAIR, TAP, and AutoDAN are written as achieving high success rates with fewer queries; the paper does not give success rates for these three.

    Baselines and benchmarks This paper does not set its own baselines. The benchmarks underlying the above figures include MCPSecBench, AgentDojo, InjecAgent, Agent Security Bench, TensorTrust, and HackAPrompt.

    Positioning The authors state that this paper uses a three-dimensional framework to consolidate existing classifications and adds skill exploitation chains and a defense-in-depth synthesis; the authors state that the skill section is the first systematic analysis. The methodology states that empirical figures are not independent reproductions.

  3. How does the paper address this problem?

    A three-dimensional classification organizes delivery, modality, and propagation, and skill chains and six-layer defense-in-depth are written at a conceptual level.

    The authors do not conduct new experiments but organize prompt injection from the literature using a three-dimensional taxonomy, describe exploitation chains on skills and MCP at the conceptual level, and propose defense-in-depth based on the architectural limitations they describe.

    Literature Methods

    • Search: Sources are arXiv, IEEE Xplore, ACM DL, USENIX. Query terms include prompt injection, LLM agent security, MCP vulnerability, coding assistant attack, tool poisoning. The time window is January 2024 to December 2025. The abstract lists 78 papers as 2021–2026, inconsistent with this window.
    • Inclusion: 183 papers initially screened. Criteria: systems with tools or external data; new attacks, defenses, or empirical results; peer-reviewed or from established security venues or preprints. This yields 78 papers.
    • Novelty boundary: The authors state that the new contributions are the unified taxonomy, skill exploitation chains, and synthesis of defense frameworks. Success rates and defense evaluations are cited from the literature, mainly MCPSecBench, IDEsaster, and Nasr et al.

    Three-Dimensional Taxonomy

    The authors state the three dimensions are orthogonal but not independent; an attack can span categories; the taxonomy is for clarifying composition, not mutually exclusive labels.

    • Delivery: D1 is direct injection, including role hijacking, context override, instruction negation. D2 is indirect injection, divided into repositories (rule files, comments, issues/PRs), documents (README, API docs, manifests), and web pages. D3 is protocol layer: tool poisoning on MCP, rug pull, shadowing, tool squatting, as well as man-in-the-middle, DNS rebinding, SSE injection.
    • Modality: M1 is text, including hierarchical claims, completion context, encoding obfuscation. M2 is semantic, including XOXO, unstated instructions, and logic that appears safe but triggers. M3 is images, audio, and video frames.
    • Propagation: P1 is single-shot. P2 is persistent, including config changes, memory poisoning, system backdoors. P3 is viral, including spread via PRs, dependency chains, and agent-to-agent propagation.

    Attack Mechanisms

    No copy-paste payloads are included. Unless otherwise noted, case success rates are in Question 4.

    • Rule files: Attackers place instructions in rule or documentation files in the repository. When a developer clones and opens it with an AI IDE, the agent treats it as trusted configuration and invokes the shell. The authors state that users do not see confirmation because autonomous settings allow file reading; they call this a technical bypass, not social engineering against the user.
    • MCP and tool descriptions: Toxic Agent Flow places instructions in GitHub issues, processed via GitHub MCP. The authors give conditions: repository tokens are authorized for whole-repo reads without per-file confirmation; the injection frames file reading as relevant to the current task. Tool poisoning exploits default trust in tool descriptions. Rug pull refers to changing behavior after approval; tool squatting refers to tools with similar names; the paper does not give success rates for each.
    • Logs and configuration: Log-To-Leak uses a log side channel with components: Trigger, Tool Binding, Justification, Pressure. In CVE-2025-53773, a payload causes Copilot to rewrite the auto-approval flag in its own configuration directory, after which tool calls no longer require confirmation. The authors state that this directory is writable by default and that the flag was not previously treated as security-sensitive. Microsoft patched it in August 2025, requiring explicit user action to enable auto-approval.
    • Skill chains: Claude Code skills are Markdown with YAML frontmatter, declaring tool types via allowed-tools. The authors state that it does not restrict targets; with Read, any file can be read, and combined with repository rules and Bash, environment variables can be exfiltrated. Copilot extensions require OAuth scopes at installation; at invocation, the context includes conversation history, and with write permissions to the repository, data can be written into commits. The authors state that these two chains were not previously documented in the literature.
    • Ecosystem table: In Table I, Claude Code is Markdown, sandbox Partial, review None; GitHub Copilot is TypeScript, sandbox Yes, review Marketplace; Cursor is JSON/MCP, sandbox No, review None; OpenAI Codex is MCP, sandbox No, review None.

    Defense-in-Depth

    Section VIII.C proposes six layers; this paper does not measure their effectiveness. The authors write that no single mechanism is sufficient; layering is to increase attack cost.

    • Signatures and permissions: Tool definitions should have digital signatures and immutable versions; the authors point to ETDI and OAuth 2.0 scopes, and state that signatures do not solve intent. Permissions should be minimized to least privilege, with outbound allowlists. Meta's Rule of Two: handling untrusted input, accessing sensitive data, changing state, or external communication—at most two of these.
    • Runtime and sandboxing: A separate guardian validates actions before execution; the authors point to MELON's mask-then-execute. Tool execution enforces sandboxing and outbound controls; the authors point to IsolateGPT; file access is containerized per project, with explicit mount declarations. Outputs are labeled with input dependencies for post-hoc analysis.
    • Human gating: Irreversible or high-impact actions require human confirmation. The authors propose four levels: Silent for read-only within the project; Logged for writes within the project with activity logging; Confirmed for shell, network, and cross-project; Blocked for credentials and system modifications. The authors state that too many prompts cause approval fatigue, too few allow attacks.

    Success Determination

    This paper has no own judge. Reported success rates and "compromises" follow the cited works; the paper does not specify their review models, thresholds, or agreement with humans. Table IV's L/M/H have no quantitative thresholds; the discussion only explains Claude Code, Cursor, and Copilot.

  4. What experiments did the paper conduct?

    The authors did not independently reproduce; in Table III adaptive success rates, Protect AI is 93% and Model Armor is 78%.

    Experimental setup

    • Whether there are new experiments: The methods section states no independent reproduction. Section VII synthesizes published figures from MCPSecBench, IDEsaster, and Nasr et al., and adds the authors' qualitative platform ratings and conceptual-level skill chains.
    • Platforms: Table IV includes Claude Code, Copilot, Cursor, Codex CLI, and Gemini CLI. The metrics are D2, D3, M2, and Overall, with values of L/M/H or Low to Critical. The paper does not give sample sizes per cell.
    • Defense table conditions: Table III includes Protect AI, PromptGuard, PIGuard, Model Armor, TaskTracker, and Instruction Det. The column names are Reported, Adaptive, and ∆. The text states that adaptive optimization uses gradient descent, RL, and random search. The paper does not define Reported, nor does it specify the target model, baseline, sample size, number of repetitions, or evaluation model.
    • Summary scope: The abstract writes 42 attack techniques and 18 defenses, with success rates over 85% against advanced defenses and most mitigations below 50%. The introduction writes 31 techniques and 12 defenses. Related work writes that 12 defenses have success rates over 90%. The conclusion writes that over 90% of published defenses are bypassed. These sentences are not the same scope as the six rows of Table III.
    • Skill chains: Only Claude Code skills and Copilot Extensions are described. VIII.D writes that attack code is not released and techniques are at a conceptual level. The paper does not report success rates for these two chains.
    • Trust boundary figures: The authors state that 73% of tested platforms fail to adequately enforce at least one boundary. The paper does not give the number of platforms, the list, or the judgment rules.

    Main results

    The table below is based on Table III and is the authors' relayed defense bypass rates. The paper does not specify the target model or baseline, so the percentages cannot be written as ASR on a specific model.

    Swipe horizontally to read the table

    DefenseReportedAdaptive∆
    Protect AI<5%93%+88%
    PromptGuard<3%91%+88%
    PIGuard<5%89%+84%
    Model Armor<10%78%+68%
    TaskTracker<8%85%+77%
    Instruction Det.<12%82%+70%
    • Text interpretation: The authors state that after using the above adaptive optimization, the attack success rate against evaluated defenses exceeds 78%.
    • Comparison with summary: The abstract's "over 85%" and the conclusion's and related work's "over 90%" do not cover all rows of the Adaptive column. Those below these summaries include Model Armor, Instruction Det., and TaskTracker.
    • Column meaning: The Reported column is not defined in the text. ∆ is the original value in the table, not a difference calculated in this paper.

    Platform ratings

    Based on Table IV:

    Swipe horizontally to read the table

    PlatformD2D3M2Overall
    Claude CodeMLLLow
    CopilotHMMHigh
    CursorHHHCritical
    Codex CLIHMMHigh
    Gemini CLIMLMMedium
    • Reasons given by the authors: Claude Code is Low because tool calls require confirmation, there is no auto-approve, MCP servers are sandboxed by default, and sensitive operations have explicit permission prompts. Cursor is Critical because auto-approve is available, MCP has no sandbox, .cursorrules are not validated, and there is no outbound control. Copilot is High, with the authors citing CVE-2025-53773's configuration rewriting and stating that marketplace review is cursory.
    • Unexplained rows: Codex CLI is High, and Gemini CLI is Medium. The paper does not separately write the rationale for these two rows.
    • Not success rates: These letters are not ASR, and the paper does not compare them with Table III under the same conditions.

    Relayed attack empirics

    • MCPSecBench: 17 attack categories, 4 surfaces. The authors relay a success rate of 85%+, meaning at least one platform is broken. The authors state that core weaknesses affect all platforms, but this entry does not list platform names.
    • AIShellJack: 314 payloads, covering 70 MITRE ATT&CK techniques. Cross-platform success rates range from 41% to 84%. Data exfiltration is 84% and persistence mechanisms are 41%, respectively the highest and lowest written in that paragraph. The paper does not list platform names in that paragraph.
    • IDEsaster: Section V writes 30+ vulnerabilities. Table II selectively lists CVE-2025-49150 (Cursor, RCE via MCP, CI), CVE-2025-53773 (Copilot, auto-approve, PE), CVE-2025-58335 (Junie, data exfiltration, DE), CVE-2025-61260 (Codex CLI, command injection, CI), and CVE-2025-53097 (Roo Code, credential theft, DE). The introduction additionally writes over 30 CVEs. The paper does not give reproduction success rates for each CVE.

    Relayed preventive results

    • Channel separation and preference optimization: Section VI writes StruQ's attack success rate as <2%, without specifying the baseline, and does not repeat the optimization-free qualification from related work. SecAlign reduces the attack success rate from 96% to 2%, without specifying the baseline.
    • Other architectural figures: The authors relay that CaMeL achieves provable security on 77% of AgentDojo tasks. Related work writes that Progent reduces from 41.2% to 2.2%, without specifying the baseline. Chen et al. achieve a 100% mitigation rate across 55 attack types. PromptArmor has false positives/false negatives <1% and post-defense success rate <1%; the authors state that evaluation against adaptive attacks remains limited.
    • Vendor figures and hierarchical training: The Claude 3.7 System Card claims to block 88%. The authors consider this a claim on the vendor's internal benchmark, which may be lower when compared with independent evaluations against adaptive attacks, and state that the remaining 12%+ attack surface remains exploitable. Instruction hierarchy is written as reducing, but not eliminating, attacks.

    Other ablations and analyses

    The paper does not report its own ablations, parameter sweeps, or number of repetitions. Section VI and related work write about StruQ differently: the former only writes an attack success rate of <2%, while the latter qualifies <2% as optimization-free attacks.

  5. What are some points that can be further explored?

    The authors wrote in VIII.F about outdatedness, closed-source, benchmarks, static defenses, and selection bias; the methodology states no reproduction.

    Limitations and future directions noted by the authors

    • Update speed: The authors write that the field evolves faster than the publication cycle, and findings may be outdated by the time of publication (VIII.F).
    • Closed source: The authors name major platforms such as Claude, GPT-4, and Copilot as closed-source, with internal defenses invisible, and evaluations measuring black-box behavior (VIII.F).
    • Benchmarks: The authors believe existing benchmarks may not reflect the complexity of real attacks; attackers with higher motivation and resources may achieve higher success rates (VIII.F).
    • Defense types: The authors write that static defenses are mainly evaluated, while adaptive defenses that learn from attacks remain understudied (VIII.F).
    • Publication sample: The authors believe published attacks may have selection bias, and successful cases by high-capability attackers may never be disclosed (VIII.F).
    • Future work: The authors list formal verification of trust boundaries, architectures that separate instruction and data pathways, and economic frameworks that incentivize security investment (VIII.E, Section X). The same section also writes that early results on adversarial training suggest limited generalization, and that latent injection in long sessions, the utility cost of context cleaning, and dormant payload detection need research (VIII.E).

    Experimental coverage

    • Literature: The search window in the methods section is January 2024 to December 2025, with 183 papers screened down to 78. The abstract writes the time range of the 78 papers as 2021–2026.
    • Figure sources: Attack success rates and defense evaluations are cited from MCPSecBench, IDEsaster, and Nasr et al. The methods section states that no independent reproduction experiments were conducted.
    • Platform ratings: Table IV includes Claude Code, Copilot, Cursor, Codex CLI, and Gemini CLI, with values of L/M/H and overall ratings, not attack success rates.
    • Defense table: Table III has Reported, Adaptive, and ∆ for 6 detection defenses. The paper does not specify the target model, baseline, sample size, number of repetitions, or evaluation model for these cells.
    • Skill chains and scope: The exploitation chains are written for Claude Code skills and Copilot Extensions. VIII.D states that the techniques remain at a conceptual level and attack code is not released. The abstract's attack technique count is 42 and defense count is 18; the introduction has 31 and 12, respectively.
  6. Summarize the main content of the paper

    SoK summarizing prompt injection in coding assistants: three-dimensional classification, bypass rates from the literature, and conceptual-level skill chains.

    The authors position this SoK as a literature synthesis of prompt injection in programming assistants, not as new attack or defense experiments. Attackers are divided into three levels: content injection, tool publication, and network attacks, and they cannot modify system prompts.

    • Problem: Agents can read files, execute commands, and call MCP tools, with instructions and external data sharing the same pathway. The authors argue that indirect injection can alter behavior without direct user interaction.
    • Approach: A three-dimensional taxonomy covering delivery, modality, and propagation. Rule files, GitHub MCP, tool descriptions, and skill chains are described at the mechanism level, without publishing attack code. Defense recommendations are signatures, permission minimization, runtime validation, sandboxing, provenance tracking, and human gating; their effectiveness is not tested in this paper.
    • Numbers: None are independently reproduced. In Table III, adaptive success rates are 93% for Protect AI and 78% for Model Armor. MCPSecBench reports that 85%+ of attacks compromise at least one platform. AIShellJack reports 84% data exfiltration and 41% persistence. In Table IV, Cursor is Critical and Claude Code is Low.
    • Authors' conclusions: Table V lists architectural fixes for prompt injection as "None known." The authors argue for treating it as a vulnerability class requiring architectural mitigation, not just ad-hoc filtering; they also argue that higher capability and broader external access increase the attack surface, a trade-off with no clear solution.

Related papers

Read originalarxiv.org