Skip to main content

Can Prompt Injection Be Solved? What Researchers Say Now

· By Natalie Walls

No, prompt injection can't be reliably solved with today's language models, and the people closest to the problem say so. OpenAI wrote in December 2025 that prompt injection, "much like scams and social engineering on the web, is unlikely to ever be fully “solved”" (OpenAI). The UK's National Cyber Security Centre agrees: "The best we can hope for is reducing the likelihood or impact of attacks" (NCSC).

That doesn't mean nothing works. It means the goal shifts from "stop it" to "make it rare and make it harmless."

Why prompt injection is so hard to solve

The NCSC explains the core issue: models process everything as text and don't separate instructions from data. Any defense is laid on top of a system that has no built-in line between the two. That's why there's no fix like parameterized queries for SQL. We explain the contrast in Prompt Injection vs SQL Injection.

Simon Willison, who named the attack in 2022, pointed out the testing problem early. Models are black boxes, so no amount of testing proves an attacker can't find a phrasing that works, and every model upgrade could open new gaps (Simon Willison).

Why detection alone falls short

A popular idea is to put a classifier in front of the model to catch attacks. Willison argued against relying on that in 2022 for three reasons: the detector is a language model too, so it can be attacked; filters block legitimate text, like a blog post about prompt injection; and probabilistic protection isn't enough. In his words, "a solution that works 99% of the time is no good" (Simon Willison).

Research since then backs this up. In October 2025, a paper titled "The Attacker Moves Second" tested 12 recent defenses against adaptive attackers who tune their attacks to each defense. The attacks succeeded more than 90% of the time against most of them, even though most had originally reported near-zero attack success (arXiv).

Where real progress is happening

Better-trained models

Model makers are training models to resist injection. OpenAI's instruction hierarchy paper ranks instructions by privilege and trains models to follow higher-privilege ones, which significantly improved robustness on GPT-3.5, including against attack types not seen in training (arXiv). The researchers behind spotlighting reported that the technique, which marks where input came from, cut attack success from above 50% to below 2% in their tests on GPT models (arXiv). OpenAI says it now uses an automated attacker trained with reinforcement learning to find injections against its browser agent, then retrains the agent on what it finds.

These help a lot, but they're probabilistic. The adaptive attack results are a reminder to test them against attackers who know they're there.

Designs that don't trust the model

The more durable progress is in system design. A team including Nicholas Carlini and Florian Tramèr proposed CaMeL, which separates the program's control flow, taken from the trusted user request, from the untrusted data the model reads, and tracks where data came from before any tool runs. On the AgentDojo benchmark it solved 77% of tasks with provable security, against 84% for an undefended system (arXiv). That's a real trade-off, but a measurable one.

A 2025 paper by authors from IBM, Invariant Labs, ETH Zurich, Google and Microsoft, as Simon Willison summarized it, described six design patterns built on one idea: once an agent has read untrusted input, constrain what it can do next (Simon Willison).

If prompt injection can't be solved, what should you do?

Treat prompt injection as a risk you manage, not a bug you close:

  • Assume it will sometimes work. The NCSC says that if a system can't tolerate the leftover risk, an LLM may not be the right choice.
  • Limit what a successful injection can do. Least privilege, narrow tools and human approval for risky actions matter more than any filter. Avoid the lethal trifecta.
  • Be skeptical of "we stop prompt injection" claims. The NCSC says so directly.
  • Test like an adaptive attacker, and rerun tests after every model, prompt or tool change.

Next step: start with the harmless canary payloads, then follow How to Prevent Prompt Injection.