Claude Opus 4.5 Prompt Injection Defenses: The Real Numbers
Anthropic just did something almost nobody in AI does: they published actual prompt injection failure rates. Not vague assurances about safety. Not carefully worded marketing claims about “robust safeguards.” Actual numbers — single-attack success rates, multi-attempt escalation curves, breakdowns by attack surface.
The headline number is 1%. That’s what Anthropic reports as Claude Opus 4.5’s prompt injection attack success rate in browser-use scenarios with moderate safeguards enabled. It’s a dramatic improvement over previous Claude versions, and it’s better than what competitors have published. But it’s also not the whole story, and the details matter more than the headline.
A separate benchmark by the security firm Gray Swan found a more nuanced picture. A single “very strong” prompt injection attack breaks through Opus 4.5’s safeguards 4.7% of the time. Give an attacker ten attempts, and the success rate jumps to 33.6%. At 100 attempts, it hits 63%. These numbers are better than Google’s Gemini 3 Pro and OpenAI’s GPT-5.1, both of which fare significantly worse under the same testing conditions. But they’re still high enough that you wouldn’t want to connect an agent with Opus 4.5-level safeguards to anything that could do real damage.
Anthropic themselves say prompt injection is “far from a solved problem.” That’s not false modesty. It’s an honest assessment from the company that’s done more than anyone else to measure and mitigate the risk. Here’s what they’ve actually achieved, where the gaps remain, and what it means for anyone building agent-based systems in 2026.
How Anthropic Measures Prompt Injection Risk
The first thing to understand is that Anthropic has changed how they measure prompt injection. In their February 2026 system card, they dropped the direct prompt injection metric entirely and focused on indirect injection — the scenario where adversarial content is embedded in data the model processes, like a webpage it’s browsing or a document it’s reading.
This makes sense. Direct injection — where the attacker has direct access to the prompt — is a less realistic threat in production systems. If someone can modify your system prompt, you have bigger problems than prompt injection. Indirect injection is what keeps security teams up at night: a user uploads a CSV file that looks normal but contains hidden instructions, or an agent visits a webpage that has malicious content embedded in a way that’s invisible to humans but parsable by the model.
Anthropic’s testing methodology breaks down results by attack surface, attempt count, and safeguard configuration. The Opus 4.6 system card goes even further, publishing failure rates that vary by the strength of the attack and the specific defensive measures in place. This is significantly more detail than what OpenAI or Google have published, and it’s the kind of transparency that makes it possible to make informed decisions about deploying these models in high-stakes environments.
The Gray Swan Numbers
Gray Swan’s benchmark adds important context to Anthropic’s self-reported numbers. Their methodology uses adversarial attacks specifically designed to break through model safeguards — the kind of attacks that real adversaries would use, not the milder test cases that sometimes appear in academic papers.
The key finding is the escalation curve. A 4.7% success rate on a single attempt sounds manageable. But 33.6% at ten attempts and 63% at 100 attempts tells a different story. It means that if an attacker can try repeatedly — which is realistic in many scenarios, since most systems don’t rate-limit adversarial inputs aggressively enough — they’ll eventually succeed more often than not.
This escalation pattern is consistent across models. It’s not unique to Opus 4.5. What is unique is the degree of improvement. When Gray Swan ran the same tests against earlier Claude versions, the success rates were substantially higher. Anthropic has made real progress on this problem, and the progress is measurable.
The comparison to other models is instructive. Under Gray Swan’s testing, Gemini 3 Pro and GPT-5.1 both showed higher single-attack success rates than Opus 4.5, and their escalation curves were steeper — meaning repeated attempts were more likely to succeed more quickly. The gap between Anthropic and the field is real, even if nobody is anywhere close to “solved.”
What Anthropic Changed
Anthropic’s approach to prompt injection defense has evolved across several dimensions over the past year.
The first is model-level robustness. Opus 4.5 and 4.6 have been trained specifically to resist adversarial instructions embedded in processed content. This isn’t a prompt-level fix — it’s baked into the model weights through techniques that Anthropic has described in broad terms but hasn’t fully disclosed. The result is a model that’s less likely to follow instructions that are clearly injected rather than genuinely part of the content it’s supposed to process.
The second is permission architectures. Claude’s computer-use and browser-use capabilities now operate under a tiered permission model with six distinct modes, ranging from fully autonomous to fully human-approved. Each mode defines what the agent can do without asking, what it must ask about, and what it’s prohibited from doing regardless. The tighter permission modes add latency but dramatically reduce the blast radius of a successful injection attack.
The third is runtime monitoring. Anthropic has built what they describe as “identity-aware analytics” into Claude’s agent runtime — essentially, the system monitors its own behavior patterns and flags deviations that might indicate a successful injection. If an agent that normally makes low-risk API calls suddenly tries to exfiltrate data or execute a shell command, the monitoring layer can intervene. This is defense in depth: even if the model follows an injected instruction, the system around it may catch and block the action.
The fourth is deployment pattern guidance. Anthropic’s published guidance for Claude-based agent systems includes specific recommendations for how to structure deployment to minimize injection risk: sandbox the agent’s execution environment, limit its access to sensitive data, require human approval for high-impact actions, and log everything in a tamper-evident format. None of these are novel ideas, but Anthropic has done the work of quantifying how much each measure reduces injection success rates in practice.
The 1% Is Context-Dependent
Anthropic’s headline 1% figure comes with important caveats. It applies to browser-use scenarios with moderate safeguards enabled — not to arbitrary agent deployments with unrestricted capabilities. In higher-risk configurations or with different attack types, the number can be higher.
The specific context matters because browser use has natural constraints that limit what a successful injection can accomplish. A browser-based agent can navigate pages, fill out forms, and extract text, but it can’t execute arbitrary code on the host system or access files outside the browser sandbox. The blast radius of a browser-use injection is bounded in ways that don’t apply to an agent with shell access, database credentials, or API keys.
This is why Anthropic is cautious about extending their claims beyond the specific scenarios they’ve tested. If you’re building an agent that can make financial transactions, modify production infrastructure, or access customer data, the 1% number doesn’t apply to your system. You need to run your own testing against your actual configuration.
The Real-World Implications
So where does this leave teams that are building agent-based systems today?
For browser automation with moderate safeguards, the risk profile is probably acceptable for internal use cases. If an agent occasionally follows an injected instruction while browsing the web, the worst case is usually that it navigates to the wrong page or extracts incorrect data — annoying but not catastrophic. The 1% failure rate in this context is comparable to the error rate you’d get from an inattentive human.
For agents with API access, the calculus changes. An injected instruction that causes the agent to make an unauthorized API call — sending an email, modifying a database, triggering a workflow — could have real consequences. The Gray Swan data suggests that a determined attacker with multiple attempts has a better-than-even chance of succeeding. If your agent has API access, you need additional layers of defense: human approval for high-impact actions, strict rate limiting, anomaly detection on the agent’s API call patterns, and blast-radius containment.
For agents with shell or system access, the answer in 2026 is still “don’t.” The combination of prompt injection risk and high blast radius is too dangerous. Anthropic’s numbers are encouraging relative to where the field was a year ago, but they’re not low enough to justify giving an LLM agent unrestricted system access. If you absolutely need this, run the agent in an ephemeral sandbox that gets destroyed after each task, with no persistent credentials and no network access to production systems.
Why This Matters Beyond Anthropic
Anthropic’s decision to publish these numbers has implications for the broader AI industry, and most of them are positive.
First, it sets a precedent for transparency. If Anthropic can publish their prompt injection failure rates without suffering competitive harm, there’s less excuse for other labs to keep theirs hidden. The fact that OpenAI and Google haven’t published comparable numbers is a choice, not a technical limitation.
Second, it shifts the conversation from “is prompt injection solvable?” to “how much risk are we willing to accept?” The Gray Swan data makes clear that no model is immune to prompt injection, and probably no model will be for the foreseeable future. The question becomes one of risk management rather than risk elimination — the same framing we use for every other security problem in computing.
Third, it creates a baseline for improvement. Everyone in the field now knows that the current state of the art is roughly 4.7% single-attack success and 63% at 100 attempts. The next generation of models will be measured against those numbers. That’s how progress happens — you measure, you publish, and the next team tries to beat your numbers.
What’s Still Missing
For all the progress Anthropic has made, there are gaps in what’s been published that matter for production deployments.
The testing doesn’t cover multi-modal injection attacks — adversarial content embedded in images, audio, or video that a multi-modal agent might process. This is a known attack vector that’s harder to test systematically, but it’s also the direction agents are moving. As models get better at processing images and video, injection attacks will evolve to use those modalities.
The testing also doesn’t cover chained injection attacks — scenarios where an attacker uses a successful injection in one part of a system to gain access to another part. If an agent processes a document, gets injected, and then uses its API access to modify a different document that another agent will later process, the injection can propagate through the system in ways that are hard to trace.
And the testing is done against static attack patterns. Real adversaries adapt. When a defense becomes known, attackers develop countermeasures. The Gray Swan numbers are a snapshot of what works today, not a guarantee of what will work tomorrow.
These gaps don’t diminish what Anthropic has achieved. But they’re a reminder that prompt injection defense, like all security, is a process rather than a product. The 4.7% number isn’t the end of the story. It’s a checkpoint on a long road.