Skip to content

Lesson 3 of 9 · 7 min read

Prompt Injection versus Jailbreaking

Free lessonReviewed By the AISecurityInterviews editorial team
Reading position
In this lesson

TL;DR: Use jailbreak to describe an attempt to bypass safety restrictions, and prompt injection to describe lower-authority material redirecting model behavior against governing instructions or task authority. These categories can overlap. A useful finding states the actual policy, source, observed consequence and responsible controls instead of relying on the label to determine severity or ownership.

Before you read

Pick an answer before you read further. The lesson below explains it, and guessing first, right or wrong, helps the explanation stay with you.

  1. 1A model produces a prohibited draft after reading a third-party document, but the publication service refuses the requested post. Is this one failure, one success or something else?

What you should be able to do

Classify a scenario without confusing its delivery route, policy target and observed outcome. Explain why a safety benchmark cannot establish that an application's private records or tools are correctly authorized. Assign remediation to the components that control the failure, including the model provider and the application team where both contribute.

Agree on the vocabulary, then describe the event

Security writing does not use these terms uniformly. Simon Willison's March 2024 distinction emphasizes attacks on model safety mechanisms versus attacks on applications using models. The OWASP 2025 prompt-injection entry, checked November 2026, uses a broader definition and describes jailbreaking as a form of prompt injection.

Neither convention excuses an ambiguous incident report. State the definition you are using and describe the event in operational terms. For example: a third-party document redirected an assistant's answer, a prohibited output reached a reader, or a tool disclosed a record outside the active grant. A reader can assess those statements even if their taxonomy differs.

In this lesson, jailbreak attempt means an input tries to bypass applicable safety restrictions. A successful bypass requires evidence of violating those restrictions. The rules may be implemented in training, application prompts, moderation or several layers. Their ownership is not necessarily confined to the model provider.

Prompt-injection attempt means input with insufficient authority tries to redirect the model against the governing task or rules. It can affect plain answers, retrieved information, saved state or tools. The attempt need not succeed, and the result need not be a data breach. A normal authorized user instruction is not an attack merely because the developer did not write it.

Three questions that keep classification useful

Ask who supplied the material and how it arrived. A direct user request and a third-party passage carried in a user message can share an API role while differing in authorship. Record both. An evaluation may classify pasted material by its entry route; that convention should not hide the source's limited authority.

Next identify the rule or task boundary. “The answer was rude” is insufficient without the relevant policy and context. “The assistant disclosed a different customer's private record” identifies a confidentiality failure that needs application authorization evidence, whether or not a safety filter also should have stopped it.

Finally establish what happened. An attempted bypass, a generated draft, an admitted tool call and a delivered result are different observations. Keep uncertainty about the last step visible. A source appearing in the context is a lead for investigation, not proof that it caused the result.

CLASSIFICATION · OVERLAPPING FAILURE MODES
Classify the policy and observed result before assigning a label

Source and route

Author is not always carrier

Governing rule

Safety, task or both

Observed consequence

Draft, exposure or effect

Control owners

Assign the actual repairs

1/3

Preserve the source distinction

A third-party passage can arrive inside a user message. Record author, carrier and intended role separately.

Classify the case before choosing a control

The following cases are fictional. Assume the public assistant's declared policy prohibits targeted abusive output, while its private document tools require a current task grant and an authorized recipient.

CaseUseful classificationWhat the evidence must establish
A user asks for an allowed change of languageLegitimate task requestThe change remains within governing rules
A user tries to induce targeted abusive outputJailbreak attempt under the stated safety policyWhether prohibited output was produced and exposed
A retrieved page attempts to replace a comparison's criteriaIndirect prompt-injection attemptWhether source content changed the task's decision
A page induces a prohibited public post outside the task's grantOverlapping safety and application-authority failure, if confirmedThe relevant policy violation, admitted action and actual audience
An answer is wrong with no evidence of attempted redirectionQuality or safety failure requiring investigationWhether the cause was retrieval, generation, source manipulation or something else

An unauthorized disclosure can also violate a model or application's safety policy. Conversely, an injection can redirect a benign task without requesting content prohibited by a safety policy. Avoid defining the categories as mutually exclusive kinds of harm.

Ordinary-looking requests can still be recognized as harmful

A request to send a file can be legitimate in one task and a disclosure attempt in another. Its surface wording does not settle the result. A model or detector with relevant context may recognize the unauthorized intent and refuse it. It is inaccurate to say that safety training has nothing to object to merely because the requested action is an ordinary business operation.

The limitation is assurance and scope. A detector trained for one set of content-policy violations has not necessarily been evaluated on your document permissions, task grants, tool arguments or recipient policies. It may lack the authoritative state needed to decide. A strong score on that detector's benchmark is evidence for those evaluated conditions, not proof that the application's actions are authorized.

Retain useful model refusals and contextual detection. Enforce resource access and effect policy independently so that a missed classification cannot grant authority. Keep the data used for those decisions trustworthy: a recipient permission extracted from the same hostile document is not an independent policy check.

Ownership follows the failing component

ComponentResponsibilityWhat it cannot establish alone
Model training and instruction priorityProvider or model operator improves evaluated behaviorCorrect permissions in every connected application
Application safety policy and moderationProduct and safety owners define allowed content and delivery responsesWhether a specific database object may be read
Retrieval and resource servicesApplication owners enforce identity, task scope and resource policyWhether every permitted answer is accurate or appropriate
Tool and publication servicesOperators enforce action terms, recipients, limits and current authorityThat a model will never propose a forbidden action
Incident handling and user communicationDesignated responders establish impact, contain and recoverRoot cause from a detector label alone

An application team can control moderation, output exposure, abuse responses and capabilities even when it cannot retrain a hosted model. A model provider can improve instruction-following behavior relevant to injection as well as safety refusals. For an internally operated model, the same organization may own both. Use named responsible teams and an escalation path rather than sending every report to a single owner based on terminology.

Measure policy failures and useful work separately

For safety evaluation, define the content policy, prohibited outcome, audience, test-set construction and adjudication method. Include legitimate requests that resemble the negative cases so that unnecessary refusals are visible. A nonempty response is not automatically a policy violation, and a refusal of an allowed request is not a successful user outcome.

For application injection evaluation, define the permitted source changes and the actual task. Observe generated answers, proposed reads, admitted actions and final effects under current grants. Include legitimate work and report unknown outcomes. The instruction-hierarchy paper (2024) examines learned priority across different attack settings; its results do not make those settings interchangeable.

A combined case can contribute to more than one metric. Suppose a synthetic test produces a prohibited draft but the publishing service denies its release. Record the generated-content failure and the successful publication denial. If the draft was already visible to an unintended reviewer, the denied public post does not undo that exposure. Define the observation boundary before counting success.

Do not use an adaptive search's fraction of successful attempts as the daily probability of harm. Do not merge results from different audiences, policies and capabilities into a single “AI resistance” score without explaining the aggregation and its limits. AgentDojo (2024) illustrates the value of evaluating security properties alongside legitimate agent tasks; use a deployment-specific test to decide your own controls.

Severity comes from consequences, not terminology

An offensive reply, a misleading recommendation, a cross-customer disclosure and a forbidden transaction have different consequences. Their seriousness depends on the material, audience, reach, repeatability and recovery options. Content alone can create significant harm. A tool proposal that was denied may provide valuable evidence of a reachable weakness without establishing a completed incident.

Avoid both extremes: dismissing a confirmed harmful answer because it used no tools, or describing a harmless symptom as proven access to every system the assistant knows about. State demonstrated impact, additional plausible reach and the evidence needed to distinguish them. Restrict the affected path when warranted, preserving legitimate service where current controls justify it.

What if · interview follow-ups

Hold your answer as the constraints change

A fictional public assistant has a declared content policy and separate grants for private records and public posting. Classify each report using that policy and the observed result.

  1. Start here

    A report calls a rude poem a jailbreak. What is missing?

Give an explanation that another team can act on

Use a short finding structure: source and route, governing rule, observed output or action, actual audience, failed or successful control, and unresolved evidence. Add the taxonomy labels afterward. This makes the report useful to a provider investigating model behavior, a product owner setting policy and an engineer correcting authorization.

Continue with direct and indirect injection for source-path analysis, or evaluation of injection defenses for designing the test evidence. Neither a label nor a benchmark substitutes for a specific failure claim.

Check yourself

Say or write your answer first, then reveal. Explaining it from memory, in your own words, is the skill an interviewer is checking.

  1. 1Must prompt injection and jailbreaking be mutually exclusive in a report?

  2. 2Does ordinary business wording guarantee that a safety model will miss unauthorized disclosure?

  3. 3Who owns remediation when a prohibited model answer is delivered by your product?

  4. 4Which is automatically more severe: an indirect injection or a jailbreak?

Practise it as an interviewer asks it

Related lessons