Task type and prompt style cause up to 4.5× variation in coding agent poisoning success
User prompt configurations dramatically influence coding agents' vulnerability to repository poisoning
AI/ML arXiv 31 Aug 2026 Measurement Prototype evidence
Published as “Beyond the Payload: How User Invocation Shapes Coding Agent Vulnerability to Repository Poisoning”
Why it matters
Developers should avoid delegating run-tests tasks and noisy prompts when using coding agents on untrusted repositories, and rely on security-aware rules while recognizing that alerts may arrive after payload execution.
Summary
Task type drives coding-agent vulnerability: the RUN-TESTS task yields the highest attack success rate (45.5%) and the lowest alert rate (8.2%), a 4.5-fold gap versus issue-fixing tasks. Underspecified prompts (TIU style) reduce ASR (Adjusted Odds Ratio 0.71) while noisy prompts can increase ASR and suppress alerts. Adding security-aware rules raises alert rates but does not significantly lower ASR. The evidence comes from a 1,920-instance benchmark (CIPR) covering 20 real repositories and multiple agents, with statistically tight confidence intervals.
What they found 4
- Task type creates up to a 4.5-fold difference in attack success rate.
“Vulnerability is highly context-dependent, with task type creating up to a 4.5-fold difference in ASR, with testexecution task forming a silent attack surface (high ASR, low AR).”
- RUN-TESTS has the highest ASR (45.5%) and lowest AR (8.2%) compared with other tasks.
“RUNTESTS has the highest ASR (45.5%, 95% CI [41.1, 50.0]), followed by PREPARE-ENV (24.9%, 95% CI [21.2, 28.9]). In contrast, the two issue-fixing tasks have the lowest ASR: FIX-FEATURE (14.8%, 95% CI [11.9, 18.2]) and FIX-BUG (8.6%, 95% CI [6.4, 11.5]).”
- Underspecified (TIU) prompts significantly reduce ASR relative to the baseline.
“the TIU prompt style significantly reduces ASR relative to the baseline (Adjusted Odds Ratio = 0.71, 95% CI [0.51, 0.98], p = 0.036).”
- Security-aware skills/rules increase alert rate but do not materially change ASR.
“the ASR confidence intervals overlap across the three skill/rule settings.”
Caveats 5
- The noisy (TNV) prompt style increases ASR by 2.0 percentage points while decreasing AR by 3.7 points, showing that some user configurations worsen security.
- Security rules improve alertness (AR) but often come too late to prevent the payload from executing, limiting their protective effect.
- CIPR focuses on prompt-level configurations rather than the full space of user-side configurations such as memory limits, MCP servers, permission policies, and IDE integrations.
- The attacker goal is limited to data exfiltration and does not cover destructive command execution or persistent compromise.
- Evaluation uses the Unconstrained Automation Mode; other interaction and permission modes (e.g., human-in-the-loop approval) are not assessed.
What’s new here 4
- Introduces CIPR, the first benchmark that systematically varies user-side prompt-level configurations (task type, prompt expression, skills/rules) in poisoned real-world repositories.
- Grounds prompt styles in a large collection of real developer prompts harvested from social media.
- Measures both attack success rate (ASR) and agent alert rate (AR) using automated runtime and trace-based oracles.
- Shows that user invocation choices, not just attacker payloads, materially affect coding-agent security across multiple models.