SentinelOS

Resources · Agent security

If the damage is a text, it's a jailbreak. If it's an action, it's an injection.

Both words describe attacks on a language model, and people use them interchangeably. They are not defended in the same place. A jailbreak targets the model's rules and produces an answer the model should have refused. An injection targets the application built around the model and produces an act nobody authorized. A detector trained against the first lets the second through, because an injection instruction looks like nothing dangerous.

In brief. A jailbreak targets the model's safety rules and produces text the model should have refused. A prompt injection targets the application built around the model and produces an action nobody authorized. If the harm is text, it is a jailbreak; if it is an action, it is an injection.

What is the difference between a jailbreak and a prompt injection?

The developer Simon Willison, who coined the term "prompt injection", drew the distinction on March 5, 2024. In his account, prompt injection is a class of attacks against applications built on language models: it works by concatenating untrusted input with the trusted prompt written by the application's developer. Jailbreaking is the class of attacks that try to subvert the safety filters built into the models themselves. He adds that without a concatenation of trusted and untrusted strings, it is not prompt injection.

Meta makes the same separation in the model card for its Llama Prompt Guard 2 models. There, prompt injections manipulate third-party or user data placed in the context window to make the model execute unintended instructions. Jailbreaks are malicious instructions designed to override the safety protections built into the model.

Not every taxonomy agrees. OWASP's LLM01 entry says jailbreaking is a form of prompt injection in which the attacker provides inputs that cause the model to disregard its safety protocols. The two readings are consistent: one sorts the attack by its technique, the other by its object. For a security lead, only the second says where to put the control.

The confusion comes from a special case. When the user types the message themselves, a jailbreak and a direct injection look very much alike. They part ways as soon as the instruction no longer arrives through the keyboard. In February 2023, Kai Greshake and his coauthors showed that applications integrating a language model can be exploited remotely, with no direct interface, through instructions placed in data likely to be retrieved. That is indirect injection. The attacker has no account and no access to the conversation, and does not need to get around the model's rules. It is enough that the model follows a text it has read.

The test: where does the damage happen?

Simon Willison explains why the stakes differ. The most common risk of a jailbreak is the screenshot: someone gets the model to say something embarrassing, publishes it, and the vendor suffers a reputation incident. The theoretical worst case is that the model helps commit a crime the user could not have committed without it. He adds that he knows of no real example of that second case, given how many existing sources of information there are.

For injection, he writes that the risk is "far more serious", because the attack is against the application, not the model. Its severity depends entirely on what the application can do. With no access to confidential data and no tools that act in the world, injection comes down to making a translation app talk like a pirate. Add confidential data and privileged tools, and everything changes.

The test fits in one sentence: if the damage is a text, it's a jailbreak; if the damage is an action, it's an injection.

This test is not for filing an attack in a box. It is for choosing where to put the defense. When the worst a model can produce is a sentence, the defense is in the model: safety training, output filters, updates. When the worst is a bank transfer, a sent email or a repository made public, the defense is in what the agent is allowed to do. OWASP's LLM01 entry follows the same separation. It says that effectively preventing jailbreaking requires continuous updates to the model's training and safety mechanisms, and against injection it recommends least privilege and human approval of risky actions.

CriterionJailbreakPrompt injection
TargetThe model's safety rules.The application built around the model.
What the attacker wantsAn answer the model should have refused.To get an act executed or data sent out.
VectorThe message the user writes to the model.A text mixed in with the application's instructions: input field, email, web page, ticket, tool return.
DamageA text.An action, or data that leaves.
Severity set byWhat the model can say.What the application can do.
Where to put the defenseIn the model: training, filters, updates.Around the agent: least privilege, deterministic control of the action, human approval.

Why isn't a guard model trained against jailbreaks enough against injection?

Because a guard model judges a text, and the instruction in an injection is not dangerous in itself. Simon Willison illustrates this with two sentences. The first is a recognizable jailbreak: a story told the way a grandmother would tell it, to obtain dangerous instructions. The second asks a mail assistant to look up sales figures and forward them to an address. A detector trained on known jailbreaks stops the first and lets the second through. On paper it is not dangerous: it is only dangerous because the assistant can read mail and send it. Willison concludes that this attack depends on the application and cannot be covered by systems trained on known jailbreaks. His advice to buyers fits in one line: do not buy a jailbreak prevention system to protect against injection.

The Llama Prompt Guard 2 model card points the same way, with the caution of a vendor documenting its own limits. The classifier labels a prompt as malicious if it explicitly tries to override prior instructions, without considering whether the prompt is harmful or whether the attack is likely to succeed. Meta dropped the "injection" label from the first version, judging that objective too broad to be useful. Among the limits, the card lists adaptive attacks, designed to evade detection, and highly application-dependent attacks, for which fine-tuning on application-specific data improves results.

Public cases confirm the limit. In EchoLeak, the attack chain against Microsoft 365 Copilot avoids Microsoft's XPIA classifier, which was built to intercept injections. The Zenity researchers, who made customer records leak from a Copilot Studio agent with a single email, note that Microsoft's fix appeared to filter their specific text. They conclude that injection remains possible, because there are too many ways to write it. Anthropic, for its part, wrote on November 24, 2025 that a 1% attack success rate still represents meaningful risk and that no browser agent is immune.

The Microsoft Security Response Center supplies the framework. A probabilistic defense reduces the likelihood of an attack without preventing every occurrence. A deterministic defense, by its design choices, guarantees that a given attack will not succeed, even if the system contains probabilistic components. Deterministically detecting indirect injection remains, Microsoft writes, an open research challenge. The UK's NCSC draws the consequence on December 8, 2025: protections should focus on deterministic safeguards that constrain the system's actions, rather than only trying to stop malicious content from reaching the model.

A guard stays useful against jailbreak, which is its job. Against injection, it lowers a frequency. What guarantees that a forbidden action does not go out sits elsewhere, on the path of the action itself. How guard models work, and where they stop, is detailed in guard models: what they see, what they cannot see.

Can the two be combined?

Yes, and it is common. Simon Willison notes that a model can sometimes be jailbroken by means of an injection, and that a model's defenses against injection can sometimes be broken by jailbreak-style attacks, in particular those that rely on detectors. The two families lend each other a hand: one obtains obedience, the other places the instruction where the agent will read it.

The account Anthropic published on November 13, 2025 about an espionage campaign detected in mid-September is a textbook case. The attackers, whom Anthropic attributes with high confidence to a Chinese state-sponsored group, manipulated the Claude Code tool to try to infiltrate about thirty targets worldwide, succeeding in a small number of cases. To get the model to obey, they jailbroke it: they broke the attack into small tasks that looked innocent and told it that it was an employee of a legitimate cybersecurity firm, running a defensive test. The jailbreak produced no embarrassing text. It opened the door to acts (reconnaissance, credential harvesting, data extraction), which the AI carried out for 80 to 90% of the campaign according to Anthropic.

This case does not contradict the test. It sheds light on it. The label on the entry attack was a jailbreak, but the damage lay entirely in acts. For the targeted organizations, the only defense within reach was on what those acts touched. The label describes the technique. The damage tells you where a control is needed. The pages on indirect prompt injection and on multi-step attacks detail the action part of this chain.

Two kinds of damage, two places for the defense

  1. Put a number on both worst cases, separately. For each agent, write down what the worst text it can produce would cost, then what the worst action it can execute with its rights would cost. The second figure dictates most of the work.
  2. Against jailbreak, rely on the model and its provider. Safety training, output filters, tracking updates: OWASP's LLM01 entry notes that preventing jailbreaking requires continuous updates to training and safety mechanisms.
  3. Against injection, bound the agent. No tool without a need, no right inherited from the user, no free outgoing action. The severity of an injection is that of what the agent can do.
  4. Put a deterministic control on the action. SentinelOS judges every action before it leaves, including when the order comes from a document the agent read. Its listening mode observes and records everything without blocking anything, before moving to enforcement.
  5. Ask a detector's vendor what it was trained and evaluated on. Known jailbreaks, injections specific to your application, or both. The answer says what the tool covers.
  6. Keep the record of what the agent had read. Without it, it is impossible to establish afterward whether an action came from the person or from a document. The subject is covered in AI agent security, and the OWASP Top 10 for agentic applications puts this goal hijacking at the head of its ten risks (ASI01).

Sources

  1. Greshake, Abdelnabi, Mishra, Endres, Holz, Fritz, "Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection", arXiv:2302.12173, February 2023. arxiv.org
  2. Simon Willison, "Prompt injection and jailbreaking are not the same thing", March 5, 2024. simonwillison.net
  3. Meta, model card "Llama Prompt Guard 2 86M", Hugging Face. huggingface.co
  4. OWASP GenAI, "LLM01: Prompt Injection". genai.owasp.org
  5. Microsoft Security Response Center, "How Microsoft defends against indirect prompt injection attacks", July 29, 2025. microsoft.com
  6. NCSC (UK), "Prompt injection is not SQL injection (it may be worse)", December 8, 2025. ncsc.gov.uk
  7. Reddy and Gujral, "EchoLeak: The First Real-World Zero-Click Prompt Injection Exploit in a Production LLM System", arXiv:2509.10540, September 2025. arxiv.org
  8. Zenity Labs, "AgentFlayer: When AIjacking Leads to Full Data Exfiltration in Copilot Studio", July 7, 2025. labs.zenity.io
  9. Anthropic, "Mitigating prompt injections in browser use", November 24, 2025. anthropic.com
  10. Anthropic, "Disrupting the first reported AI-orchestrated cyber espionage campaign", November 13, 2025. anthropic.com