Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning

Fukang Zhu, Binbin Zhao, Ruixiao Lin, Ping He, Tianyu Du, Shouling JiarXiv 2026

TL;DR

This paper introduces CIPR, the first benchmark to demonstrate that a coding agent's vulnerability to repository poisoning isn't just a static property of the attacker's payload—it is heavily shaped by how the user invokes the agent. By evaluating "Prompt-Level Configurations" (PLCs), the authors reveal that everyday choices like task delegation and prompt phrasing can cause up to a 4.5-fold difference in attack success rates, turning common tasks like running tests into silent security hazards.

What Problem Does This Paper Address?

With the rise of "vibe coding," developers routinely delegate complex software engineering tasks to autonomous coding agents, even when bootstrapping untrusted third-party repositories. While previous research heavily focuses on how attackers inject and disguise malicious payloads (e.g., via compromised accounts or malicious pull requests), it ignores a critical variable: the benign user.

The authors address this gap by exploring how a user's Prompt-Level Configurations (PLCs)—the specific task assigned, the phrasing of the prompt, and the skills or rules provided—govern whether a static malicious payload successfully executes or gets flagged by the agent.

Figure 1: Threat model. The attacker (right) injects malicious payloads into repository files via methods such as malicious PRs or account compromise. The user (left) invokes a coding agent with a task, prompt expression, and skills/rules; if the agent processes the injected content, the attack succeeds.

Methods

The authors built a controlled benchmark pipeline called CIPR (Coding In Poisoned Repos) to systematically evaluate PLCs. Their approach includes several novel components:

  1. Task Extraction: They defined four realistic developer tasks: environment preparation (PREPARE-ENV), running tests (RUN-TESTS), bug fixing (FIX-BUG), and feature implementation (FIX-FEATURE).
  2. Data-Driven Prompt Styles: Instead of inventing arbitrary prompt styles, they crawled over 1,200 real-world coding agent prompts from social media (X and Xiaohongshu). They annotated them across 12 stylistic dimensions using an LLM and used K-Means clustering to identify distinct user behaviors. They selected three highly realistic variants to test against a neutral baseline: Socially Framed Vague (SFV), Terse Indirect Underspecified (TIU), and Typo Noisy Vague (TNV).
  3. Automated Security Oracles: To safely measure outcomes inside isolated Docker containers, they deployed separate automated oracles. The Attack Success Rate (ASR) was tracked by intercepting data exfiltration attempts via a mock HTTP server. The Alert Rate (AR) was evaluated using a GPT-4o judge to analyze conversational traces for explicit agent warnings, a method validated rigorously against human annotators.
Figure 2: Dataset construction pipeline. The top row constructs the task pool: repositories are collected via GitHub API, filtered for testability and issue validity, balanced across application domains and complexity, and used to extract task instances. The bottom row constructs the three PLC dimensions: 1 tasks, derived from each repository;

Datasets

The paper introduces the CIPR benchmark, which comprises 1,920 experimental instances. It is built on top of 20 real-world open-source GitHub repositories spanning four major programming languages (Python, JavaScript, C, and Java), carefully balanced across application domains (web, IoT, CLI) and project complexities. Each instance combines a real repository, a task-specific injection (direct or indirect-deep payload), a social-media-grounded prompt style, and a controlled skill/rule configuration.

Key Insights and Ideas

  • The "Silent Attack Surface" of Testing: Coding agents interpret files differently based on the operational goal. During environment prep, an agent audits configuration files as artifacts. But when told to run tests, it treats test infrastructure blindly as code to execute, leading to high exploit success with almost zero security alerts.
  • Underspecification as an Accidental Shield: Counterintuitively, exceptionally brief and underspecified prompts (the TIU style) reduce attack success. This isn't because the agent gets smarter, but because it simply does less work, truncating its execution depth before it ever encounters the poisoned files.
  • The Detection-Prevention Gap: Providing agents with explicit security rules successfully increases how often they notice anomalies (Alert Rate), but it fails to reliably reduce successful attacks. The agent often flags the threat during or after executing the malicious payload, highlighting a critical synchronization flaw in current agent architectures.

Key Results

  • Task-Type Impact: The RUN-TESTS task yielded the highest Attack Success Rate at 45.5%, compared to just 8.6% for bug-fixing (FIX-BUG), representing a massive 4.5-fold difference in vulnerability.
  • Prompt Style Effects: The Terse Indirect (TIU) prompt style significantly reduced ASR (Adjusted Odds Ratio = 0.71) compared to the baseline. Conversely, typo-ridden, noisy prompts (TNV) tended to distract agents, lowering their alert rates.
  • Cross-Model Generalization: These behavioral patterns remained consistent across different agent frameworks and LLM backbones (including Codex with GPT-5.4/5.5, OpenCode, and Claude Code with Sonnet 4.6). Notably, Claude Code emerged as the most resilient overall, though it followed the same directional trends.
Figure 4: Experiment metrics by task type, prompt ex- pressions and skills/rules configurations. ASR: attack success rate; AR: alert rate, representing the fraction of experiments in which the coding agent explicitly warns the user.

Limitations and Future Work

The authors acknowledge several constraints in their current work:

  • Scope of Configurations: CIPR focuses strictly on prompt-level text configurations, leaving out other user-controlled variables like agent memory settings, Model Context Protocol (MCP) servers, tool permission policies, and IDE integrations.
  • Payload Monoculture: The benchmark only tests data exfiltration payloads (e.g., reading /etc/passwd and sending it via curl), omitting destructive commands or persistent compromises.
  • Automation Mode: The evaluation assumes an Unconstrained Automation Mode where agents execute tools autonomously without human-in-the-loop validation, which might overstate real-world risk for developers who manually approve tool actions.

Summary updated

BibTeX
@misc{zhu2026beyond,
  author = {Fukang Zhu and Binbin Zhao and Ruixiao Lin and Ping He and Tianyu Du and Shouling Ji},
  title = {{Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning}},
  year = {2026},
  eprint = {2608.30686},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.30686},
}
Figure