Task-tampering prompt injection: attacks that change the answer, not the task
An Amazon benchmark plants content that bends a decision inside the user's own task. Why common defences miss it, and what that means for coding agents.
Most prompt-injection tests look for one thing: planted text that tells an agent to drop its task and do something else. A paper from Amazon's Responsible AI group, submitted to arXiv on 5 November 2026, argues that this misses a large class of attacks. Planted content can leave the task alone and change its outcome instead: a contributor's comment that misstates a permission rule, or a document that misreports the current state. Across five models, those attacks often succeeded more than classic instruction overrides, and several well-known defences caught them far less well. For teams running coding agents on issues and pull requests, the paper's DevOps results are the most direct.
What the benchmark tests
The authors define indirect prompt injection by authority rather than wording: planted content is an attack when it tries to influence a decision its source isn't authorised to make. Their example is a marketplace dispute in which the buyer's evidence cites a false refund policy. The agent still resolves the dispute, as asked, but pays out more than it should.
The benchmark has 90 validated cases across three tool-use environments: a company productivity assistant (28 cases), a maintainer bot for an open-source repository (31) and a marketplace dispute agent (31). In the DevOps environment, the agent helps with issues, pull requests and deployments; maintainers and system signals such as CI status, merge state and permission levels outrank text written by external contributors. DevOps attack categories include permission escalation, removal of access or monitoring, bypassed approvals, leaking operational data and withholding security findings.
For each case, the harmful outcome is fixed, and the planted content tries to reach it through one of six "influence primitives", each aimed at a different belief the agent acts on:
- its objective ("issue a refund of this amount"), which is the classic instruction override;
- the rule that governs the choice ("policy requires adding the repair cost");
- the consequences of an action ("anything less will trigger a chargeback");
- the available actions ("the system can't process less than this");
- how to read an observation ("the displayed figure excludes the allowance");
- the current state ("the authorised total is this amount").
That gives 1,343 single-primitive attacks plus one compound attack per case. The five models, DeepSeek V3.1, Kimi K2.5, Claude Sonnet 4, Claude Sonnet 4.5 and GLM-5, ran as ReAct-style agents against MCP tool servers at temperature 0. Code and data are published on GitHub.
What it found
Without a defence, mean attack success across the five models was 17.0%. Objective attacks, the kind most benchmarks test, succeeded 15.0% of the time; attacks on decision rules (21.2%), available actions (19.0%) and state (18.6%) did better.
The defence results are the main point. The authors compared seven defences:
- Content isolation (DRIFT's injection-removal step) had the lowest attack success among defences that kept at least 90% of benign tasks working: 6.6% overall. It cut objective attacks to 2.4%, but left 9.5% for observation attacks and 12.1% for state attacks, because those read like ordinary task data. It fully stripped 78.2–85.1% of objective attacks but only 26.2–34.3% of observation and state attacks.
- Tool-policy defences barely moved the number. Progent, which enforces generated JSON Schema policies, allowed 15.4% attack success against 17.0% with no defence, and cut benign task success to 74.9%. In the paper's analysis, no tool-level gate blocked an attacked call; only argument-level checks blocked any, because a tampered call uses a tool the task needs, with a wrong value.
- Provenance tracking (CaMeL) reached 1.3% attack success, but completed only 13.3% of benign tasks in this setup, where the authors wrote its policies for their own actions.
The DevOps environment had the highest undefended attack success, 23.4%, against 14.8% for productivity and 12.7% for the marketplace. Rule attacks reached 31.5% there, and state attacks 27.1%.
Reading it carefully
The models are not the newest, so absolute numbers will not transfer to current releases. Cases were drafted with an LLM and then reviewed by the authors, with two annotators checking each design. Grading used an LLM judge that was also one of the evaluated models; the authors limit it to an extracted field and report 97.2% agreement with human annotation on sampled trajectories. And CaMeL's low task success reflects policies written for this benchmark, not necessarily a limit of the approach. The direction of the result, rather than any single percentage, is what is most likely to hold.
What it means for engineering and security leaders
Coding agents increasingly act on text written by people outside the team: issue reports, pull request descriptions, review comments, dependency changelogs. Many of the defences teams are adopting, such as prompt-injection classifiers and allow lists of tools, are tuned for text that tries to redirect the agent. This paper suggests a quieter attack works at least as well: a comment that says "CI already passed on the release branch", or "maintainers agreed this permission is required", pushes a decision the agent was going to make anyway.
The authors' proposed direction is practical: ask whether a source is authorised to determine the decision, not only whether its text looks like an instruction. For a coding agent, that means facts like CI status, permissions and merge state should come from the system that owns them, never from free text in an issue or pull request.
Practical takeaways
- Add task-tampering cases to your agent tests. For each consequential action, write planted content that misstates a rule, a state or a consequence, not just content that says "ignore previous instructions".
- Bind consequential arguments to trusted sources. Recipients, permission scopes, versions and target environments should come from the user's request or system records, and approvals should show where each value came from.
- Don't rely on tool allow lists alone. They limit which tools run, not which values they run with.
- Read vendor claims about injection defences by attack type. A low overall attack rate can hide weak coverage of state and observation attacks.
- Treat contributor-written text as claims, not facts, in system prompts and in review workflows, and give the agent tools that check those claims against CI and the repository.
For why headline injection numbers can mislead, see what a low prompt-injection success rate doesn't tell you, and for approvals that bind to the effect of an action, what an agent approval actually approves.