Attack pattern

Direct Prompt Injection

A technical reference to direct prompt injection, trust boundaries, security impact, detection, incident response, and layered defenses for LLM applications and AI agents.

By Norbert HofmannPublished: 2026-09-20Last reviewed: 2026-09-20Level: FundamentalsAudience: Security Engineers, Developers, AI Engineers
Variant
Direct
Vector
User Input
Targets
LLM, AI Agent
OWASP
LLM01:2026 Prompt Injection
Table of contents

What Is Direct Prompt Injection?

Direct prompt injection occurs when a primary user supplies natural-language input that changes an LLM application's behavior in an unintended or unexpected way. The input arrives through an intended interaction channel, such as a chat field, API parameter, command box, or agent task description. The channel is legitimate, but its content is not trusted merely because the application accepts it.

NIST frames prompt injection as a consequence of combining untrusted input with a prompt constructed by a higher-trust party, such as an application designer. NIST calls the primary-user case a direct prompting attack, in contrast to attacks delivered through resources the system later retrieves or processes. OWASP similarly distinguishes direct injection from indirect injection, where the instruction is embedded in an external source such as a document, website, email, or tool result.

A direct injection may be deliberate, but OWASP also notes that unintended input can alter behavior. The security question is therefore broader than attacker intent: can user-controlled language override application intent, expose information, or influence actions beyond the user's authority?

How Direct Prompt Injection Works

Direct prompt injection path
UntrustedAttacker
UntrustedUser Input
SystemLLM

The path begins in the application, not in the model alone. Before a request is sent, the application constructs model-visible context from higher-trust instructions and the user's input. Depending on the product, this request may also contain conversation history, descriptions of available tools or capabilities, and data selected by application logic. Not every system includes all of these sources, and implementations differ, but the model is generally asked to interpret the supplied material together when producing its next output.

Many LLM APIs distinguish instruction sources through roles such as system, developer, and user, or through comparable message structures. Those roles can influence instruction priority and make the intended hierarchy clearer. Their precise semantics are provider-specific, however. They are not equivalent to parser-level isolation, an access-control decision, or a deterministic authorization boundary. The application must not assume that placing a rule in a higher-priority role makes every conflicting user instruction harmless.

A direct injection succeeds at the model-behavior level when untrusted natural language is interpreted as an instructional signal that changes the intended task, weakens a constraint, redirects an output, or influences a proposed downstream action. The model may prioritize, reinterpret, or combine competing instructions in a way the application did not intend. This can happen even though the input remains inside its valid field and the request is syntactically well formed.

Direct prompt injection therefore does not require "breaking out" of an input field in the way SQL injection may escape a quoted value and alter a formal query grammar. Content intended by the application as untrusted data is instead interpreted as instruction-like language within the model's processing context. The analogy to classical injection is useful because attacker-controlled input affects interpretation, but the mechanics differ: prompt interpretation is probabilistic, while SQL or code injection commonly crosses a formal data-and-code boundary.

Delimiters, role labels, and carefully written prompts can improve robustness by clarifying where data begins and what task is expected. They do not provide isolation comparable to parameterized queries, typed interfaces, or an authorization layer. The resulting behavior depends on the model, the complete context, application orchestration, and available capabilities. A failed instruction-control test may produce only an irrelevant answer. In a system connected to confidential data or privileged tools, the same failure can contribute to a material security event.

Offensive Perspective and Success Conditions

For an authorized assessment, access to a valid input channel is only the starting condition. The tester must determine whether controlled input enters the composed context, survives role, format, length and task constraints, changes a response or plan, reaches model-visible data or an exposed capability, and then crosses an application control. Each stage can fail independently.

Attacker-oriented direct prompt injection chain
UntrustedControl Input Channel
Variable trustEnter Composed Context
Variable trustSurvive Task Constraints
Variable trustInfluence Response / Plan
SystemReach Data / Capability
SystemCross Application Control
Variable trustSecurity-Relevant Effect
01
QuestionControllable inputs

Which intended fields, API parameters, task descriptions and conversation turns can the assessed principal control?

02
QuestionContext conditions

Which history, roles, formats, transformations and competing instructions shape whether that input remains influential?

03
QuestionReachable assets

Which protected data, tools, destinations and state changes are model-visible or available to the workflow?

04
QuestionDeterministic gates

Which identity, resource, action, parameter and destination checks run outside the model before release or execution?

05
QuestionStage evidence

Can telemetry distinguish input acceptance, changed model behavior, a proposal, a policy decision and an actual side effect?

06
QuestionSafe execution

Can the test use synthetic data, bounded identities and reversible effects while still exercising the complete control path?

What Actually Happens in the Model Context

01Application

System or developer instructions, optional conversation history, untrusted user input, and any capabilities or tool descriptions selected for this request.

02Model-visible context

The supplied sources become context for the current inference. Their origin may be represented by roles or structure, but the model does not independently enforce the application's trust policy.

03LLM

The model interprets the context and produces a text response, a structured proposal, or a requested tool call according to the interface around it.

04Application controls

Policy, authorization, and validation evaluate any proposed action before data is released or a side effect occurs.

The application controls which sources enter this path. A simple assistant might include only a fixed instruction and one user message. A conversational product may include earlier turns. An agent may additionally receive tool names, parameter schemas, descriptions of capabilities, or selected application data. These additions can help the model perform the task, but they also increase the amount of mixed-trust material that can influence interpretation.

Roles and message boundaries can preserve useful provenance inside the request, yet the authoritative record of provenance must remain outside the model. The application should retain which principal supplied the input, which policy version created the instructions, which data source contributed context, and which capabilities were exposed. The model does not assign or enforce those trust labels for deterministic security decisions.

The model's output is another boundary, not a final decision. Text can be displayed for human review, while a proposed action can be passed to application-side controls. A secure path evaluates the initiating principal, target resource, requested action, destination, and parameters before execution. The model may recommend what to do, but it cannot establish that the user is authorized to do it.

The Trust Boundary

Application policy and system instructionsTrusted

Higher-trust application control that defines intended behavior, but is not itself an authorization mechanism.

User inputUntrusted

Attacker-controlled or unpredictable content received through the primary interaction channel.

Model contextVariable trust

A mixed-trust processing space in which application instructions and user content can influence the same model response.

These labels describe the application's security model, not a capability the LLM reliably enforces on its own. The application knows which party supplied each piece of context, what authority that party has, and which actions are permitted. That provenance can be lost when all content is flattened into text for model processing.

A secure design preserves provenance outside the prompt and carries it into policy decisions. User input remains untrusted even when it sounds authoritative, claims an emergency, quotes an administrator, or asks the model to adopt a different role. The model can help interpret the request, but deterministic controls must decide whether data may be disclosed or an action may occur.

Worked Examples

The following three paths separate instruction-control failure from downstream security impact. They use ordinary task changes rather than optimized bypass strings.

Example 1: Text-only assistant. The application asks for a constrained summary, while the user supplies text that also asks for a different response. The model follows the competing task and returns content outside the intended format.

01Application instructionSummarize the user's text without exposing internal instructions.
02Attacker input

The submitted text includes an ordinary-language request to replace the summary task with a different response.

03Model behavior

The model follows some or all of the competing user-controlled instruction and returns an unintended response.

04Security analysis

This demonstrates an instruction-control failure. Without sensitive context or consequential capabilities, it may not yet be a material security vulnerability.

The failure still matters because it shows that user-controlled language can redirect the task. Its severity must be determined from the exposed data and connected authority, rather than from the surprising response alone.

Example 2: Tool-using agent. In an agentic application, the same kind of task redirection can influence what action the model proposes. The proposal must cross an independent control plane before execution.

Model proposal
  1. User input
  2. LLM agent
  3. Proposed tool call

Prompt injection can influence the selected tool, destination, or parameters.

Controlled execution
  1. Proposed tool call
  2. Policy
  3. Authorization
  4. Allow or deny

Application controls evaluate the principal, resource, action, destination, and parameters.

The model may infer that a tool call would satisfy the manipulated request, but that inference cannot decide whether the call is permitted. A prompt instruction such as "never send data to an unapproved destination" is useful guidance, not an authorization control. Deterministic checks must deny actions outside the initiating principal's scope even when the proposed action is fluent, plausible, and confidently expressed.

Example 3: Multi-turn conversation. Direct injection is not limited to one-shot phrases such as "ignore previous instructions." Earlier user turns can establish a false premise or subtly redefine the task. If the application keeps those turns model-visible, a later request can build on that context and move behavior farther from the original purpose.

01Turn 1

The user establishes an apparently benign premise or asks the assistant to adopt a broader interpretation of its task.

02Conversation history

The earlier exchange remains available in the context supplied for later turns.

03Later turn

A subsequent request relies on the established premise and redirects the task without a single obvious override phrase.

04Security analysis

The application must evaluate cumulative task drift and downstream authority across the session, not only scan each message in isolation.

These examples illustrate mechanics rather than reusable bypass recipes. Defensive testing should vary task changes, context structure, conversation length, and available actions while measuring instruction integrity, authorization outcomes, and side effects.

Common Direct Prompt Injection Techniques

These technique names describe recurring mechanisms. They are useful for threat modeling and test coverage, but they are not mutually exclusive classifications.

01
TechniqueInstruction Override

The input asks the model to disregard, replace, or reprioritize the application's task or constraints.

02
TechniqueRole Manipulation

The input assigns the model a new identity, authority, or operating mode to weaken the intended role.

03
TechniqueContext Manipulation

The input introduces false premises, fabricated policy, or misleading context that changes how the model interprets its task.

04
TechniqueMulti-Turn Prompt Injection

A sequence of individually plausible turns gradually shifts goals, establishes assumptions, or prepares a later prohibited request.

05
TechniqueInstruction Smuggling

Instructions are embedded in content that appears to be quoted material, structured data, examples, or another task artifact.

06
TechniqueEncoded or Obfuscated Instructions

Alternative representations or transformations attempt to reduce the effectiveness of simple filters while preserving meaning for the model.

07
TechniquePrompt Leaking Attempts

The user tries to elicit application instructions or hidden context. Disclosure depends on what the application actually placed in model-visible context.

08
TechniqueTask Redirection

The input redirects the model from the authorized business task toward a different objective, output, recipient, or action.

Instruction Override, Role Manipulation, Multi-Turn Prompt Injection and encoded or obfuscated instructions are techniques, interaction patterns or representations within a prompt-injection entry path, not additional peer classes beside the direct and indirect entry paths. A technique does not change how an instruction arrived; the entry path does.

Early research by Perez and Ribeiro discussed goal hijacking and prompt leaking as useful categories for understanding instruction-following failures. These concepts provide historical context, but they do not by themselves establish the severity of a modern application's exposure.

Direct Prompt Injection vs. Jailbreaking

Related terms with different emphasis
DimensionDirect prompt injectionJailbreaking
Primary objectiveAlter application or model behavior through primary-user inputBypass safety protocols or behavioral restrictions
Security focusTrust boundaries, application intent, data access, and actionsSafety controls and restricted model behavior
RelationshipMay include many objectives beyond safety bypassA form of prompt injection focused on bypassing safety protocols
Typical consequenceRanges from unwanted output to unauthorized system effectsGeneration of content or behavior the safety policy sought to prevent

OWASP treats the concepts as related but not identical. A jailbreak is a form of prompt injection with a safety-bypass objective. A direct injection can instead seek task redirection, instruction disclosure, unauthorized tool use, or manipulation of a business workflow. Calling every direct injection a jailbreak hides the application-security questions that matter most.

Direct vs. Indirect Prompt Injection

Direct and indirect delivery paths
DimensionDirectIndirect
SourcePrimary user or attacker using the normal input channelExternal content controlled or influenced by an attacker
Attacker interactionDirect query accessResource control without necessarily interacting as the primary user
Delivery pathUser input enters the model contextWebsite, document, email, retrieval result, or tool output enters the context
Typical trust boundaryApplication instructions combined with user-controlled inputApplication instructions combined with retrieved or processed external content
ExampleA user redirects a support assistant from its assigned taskA retrieved document contains instructions aimed at the processing agent
Common contextChatbots, copilots, API-backed assistants, agentsRAG systems, browsing agents, document workflows, tool-using agents

The distinction concerns how the attacker-controlled instruction reaches the model. Both variants can exploit mixed-trust context, and both require system-level controls. See Indirect Prompt Injection for the external-content path.

Attack Surface

Direct input appears in many product forms. Exposure is determined less by the interface label than by the data, authority, and side effects connected to it.

01
System contextChatbots

Public or internal conversational interfaces where impact may range from unwanted text to context disclosure.

02
System contextAPI-backed LLM applications

Structured applications that transform user fields into model prompts and consume generated output downstream.

03
System contextCustomer-service assistants

Systems that may access customer records, case histories, refunds, or communication channels.

04
System contextEnterprise copilots

Assistants connected to organizational data, identity, collaboration systems, and business workflows.

05
System contextCoding assistants

Tools that generate, explain, or modify code and may interact with repositories, terminals, or deployment workflows.

06
System contextData-analysis assistants

Interfaces that query datasets, construct analyses, or generate executable queries and reports.

07
System contextAI search interfaces

Search systems where user instructions influence retrieval, synthesis, ranking, or presentation.

08
System contextAutonomous or semi-autonomous agents

Systems that plan steps, invoke tools, retain state, and act under delegated authority.

When Does Prompt Injection Become a Security Vulnerability?

Model misbehavior is not automatically a security vulnerability. A public, text-only chatbot that gives an irrelevant or policy-inconsistent answer has failed behaviorally, but the result may have limited security impact. The same instruction-following failure in an enterprise agent can be materially different if the agent can read confidential records, call privileged tools, send messages, approve transactions, or change persistent state.

Assess the boundary crossed and the consequence enabled. Security impact becomes credible when prompt manipulation contributes to unauthorized data access, disclosure across users or tenants, tool execution outside the initiating principal's authority, bypass of an application policy or authorization decision, persistent state modification, communication to an unapproved external destination, privilege or scope expansion, or material manipulation of a business process.

Severity is therefore system-specific. Review the full path from input to model decision to application action. Confirm what independent controls succeeded or failed. Do not rate a finding solely from a surprising transcript, and do not dismiss a model-level failure when downstream components give it authority. Research by Yi Liu and co-authors provides additional context for evaluating prompt injection in integrated applications, where system-level consequences depend on the surrounding components rather than the model response alone.

Potential Impact

OWASP lists outcomes ranging from disclosure and content manipulation to unauthorized function access, command execution in connected systems, and manipulation of critical decisions. These are potential consequences, not properties of every vulnerable prompt.

01
Potential impactSensitive Information Disclosure

Model-visible confidential data may be returned to a user who is not authorized to receive it.

02
Potential impactSystem or Instruction Disclosure

Application instructions, infrastructure details, tool descriptions, or hidden context may be exposed.

03
Potential impactUnauthorized Tool Use

The model may propose or invoke a function beyond the user's permitted task or scope.

04
Potential impactData Manipulation

Generated operations may create, modify, delete, or misclassify records when downstream controls are weak.

05
Potential impactWorkflow Manipulation

The attacker may redirect reviews, approvals, prioritization, routing, or other business-process decisions.

06
Potential impactExternal Communication

A connected agent may send messages, requests, files, or data to unintended recipients or destinations.

07
Potential impactPrivilege Abuse or Confused-Deputy Behavior

The system may misuse its own broader authority on behalf of a less-privileged initiating user.

Direct Prompt Injection in AI Agents

Agency changes the impact model. A text-only assistant primarily produces content for a person to evaluate. An AI agent may select tools, retrieve internal data, call external services, or execute a sequence of actions under delegated authority. Prompt manipulation can then become an authorization and action-security problem rather than only an output-quality problem.

Text generation
  1. User
  2. LLM
  3. Text response

The user evaluates the result before taking action.

Agentic execution
  1. User input
  2. LLM agent
  3. Tools and data
  4. External systems

Each transition can introduce authority, data exposure, or side effects.

The model can interpret intent and propose or select an action, but it should not grant itself permission. Give the agent an explicit identity, scope its tools and credentials, authorize every consequential action against the initiating principal and current resource, validate parameters, and retain an audit trail. Vendor guidance from Microsoft supports these architecture principles, including least privilege, explicit identity, per-action authorization, auditability, and human approval for high-impact operations.

Prompts remain useful for task guidance, but a sentence such as "never send confidential data" is not an authorization boundary. Deterministic application controls must enforce who may access which resource, invoke which tool, and communicate with which destination.

Detection

Correlated detection signals
  1. 01
    Input and context analysis

    Inspect provenance, encoding, unusual instruction patterns, and changes in the role assigned to supplied content.

  2. 02
    Instruction-conflict indicators

    Identify attempts to replace the task, disclose hidden context, claim unsupported authority, or suppress controls.

  3. 03
    Task-change and plan-drift detection

    Compare the requested objective with the model's emerging plan and flag unexplained changes in scope.

  4. 04
    Tool and authorization signals

    Monitor unexpected tool calls, denied permissions, unusual parameters, and repeated attempts after a refusal.

  5. 05
    Data-access anomalies

    Detect resources, users, tenants, or volumes that do not match the initiating task and principal.

  6. 06
    Outbound and behavioral anomalies

    Review unusual destinations, consequential actions, and deviations from the expected task envelope.

Detection is signal-based and probabilistic. Keywords and prompt classifiers can contribute evidence, but language is variable and legitimate requests can resemble attacks. A single detector should neither automatically prove compromise nor serve as the only control. Correlate input signals with model plans, authorization results, tool telemetry, data access, and downstream effects.

Logging and Telemetry

Investigation requires a trace across the complete request and action chain. Record enough structured context to reconstruct decisions without collecting more sensitive content than necessary.

Useful investigation fields
FieldOperational purpose
Timestamp and correlation IDsOrder activity across model, policy, tool, and downstream systems
Session or request IDGroup turns and actions belonging to the same interaction
User or initiating principalEstablish identity, tenant, role, and delegated authority
Original user inputReconstruct the initiating request where collection policy permits
Application and policy versionIdentify the active instructions and deterministic controls
Model and versionAssociate behavior with the deployed model configuration
Retrieved context identifiersTrace any additional material included in the request
Proposed tool, action, and parametersUnderstand what the model attempted to do
Authorization decisionConfirm which policy allowed or denied each action
Accessed resource and downstream resultMeasure actual data exposure and state change
Outbound destinationIdentify external communication or data transfer
Human approval decisionRecord who approved, rejected, or modified a consequential action

Prompt and context logs can themselves contain personal, confidential, or regulated data. Apply access controls, minimization, redaction where appropriate, defined retention periods, and secure deletion. Preserve forensic value while avoiding a new centralized disclosure risk.

Incident Response

Direct prompt injection response

  • Preserve relevant prompts, model context, policy decisions, application logs, and tool telemetry.
  • Identify the initiating input and authenticated principal.
  • Reconstruct the sequence of model decisions, tool calls, data access, and downstream results.
  • Review authorization outcomes and determine which control allowed or denied each action.
  • Identify confidential data or resources that were accessed or disclosed.
  • Inspect external communications, side effects, and persistent state changes.
  • Revoke or constrain affected credentials, tokens, sessions, and delegated access where needed.
  • Contain excessive tool permissions and disable unsafe action paths while preserving evidence.
  • Assess cross-user, cross-tenant, and business-process impact.
  • Update detections, tests, policy, and architecture based on the observed failure mode.

Do not stop at removing the visible prompt or adding its wording to a blocklist. Determine why the model's output reached sensitive data or authority, and correct the missing system control.

Prevention and Mitigation

OWASP states that there is no clearly fool-proof prevention method. Effective risk reduction combines controls that limit instruction influence, data exposure, model authority, and downstream consequences.

  1. 01
    Treat input as untrusted

    Preserve source and provenance. Do not convert a normal user channel into implicit authority.

  2. 02
    Constrain role and task

    Use focused instructions, limited workflows, and explicit expected outputs to reduce unnecessary behavioral freedom.

  3. 03
    Validate outputs

    Parse and validate generated structures, parameters, destinations, and claims before downstream use.

  4. 04
    Minimize model-visible secrets

    Do not place credentials or confidential context in the prompt unless the task genuinely requires it.

  5. 05
    Authorize outside the LLM

    Apply deterministic checks based on user identity, resource, action, tenant, and current policy.

  6. 06
    Use least privilege

    Give agents scoped tools, credentials, data access, and time-limited authority.

  7. 07
    Validate actions and parameters

    Use allowlisted operations, typed interfaces, business rules, and destination controls.

  8. 08
    Require human approval

    Place meaningful confirmation before high-impact, irreversible, financial, or external actions.

  9. 09
    Restrict execution

    Apply network and egress controls, sandboxing, isolation, and rate or step limits where relevant.

  10. 10
    Test adversarially

    Exercise instruction integrity, confidentiality, authorization, tools, state, isolation, and telemetry before and after changes.

Input and output filtering can remove known patterns or obvious unsafe results, but filtering alone is insufficient. Attack language changes, benign content can trigger false positives, and authorized behavior still requires validation.

Secure Architecture

Risky
  1. User
  2. LLM
  3. Privileged Tool

The model's interpretation directly reaches a high-authority capability.

Stronger
  1. User
  2. LLM
  3. Policy Engine
  4. Authorization
  5. Validation
  6. Tool

Independent controls decide whether the proposed action is permitted and safe to execute.

In the stronger design, the model may recommend an action and produce candidate parameters. A policy layer then evaluates the action against explicit rules. Authorization checks the initiating identity and target resource. Validation enforces types, ranges, destinations, and business invariants before the tool runs.

This chain does not make model behavior predictable. It reduces the consequence of unpredictable behavior. The model cannot expand its own scope, approve its own exception, or treat a user-provided claim as proof of authority.

Threat Modeling Checklist

Questions for design review

  • Where do application instructions and user-controlled content cross trust boundaries?
  • Which secrets or sensitive context can become visible to the model?
  • Which identity does the agent use, and is initiating-user identity preserved?
  • Which data can the model retrieve across users, tenants, or classifications?
  • Which tools and parameters can it propose or invoke?
  • Which actions are irreversible, high impact, or externally visible?
  • Which network destinations and communication channels are reachable?
  • Can user input modify long-term memory, configuration, or persistent state?
  • Could one user's request affect another user or tenant?
  • Can monitoring connect input, model plan, authorization, tool call, and result?
  • Where is informed human approval required?
  • How can operators revoke authority, stop execution, and contain an active workflow?

Testing Direct Prompt Injection

Use a controlled environment, synthetic data, and test identities with deliberately bounded permissions. Define expected policy outcomes before testing so evaluation measures security boundaries rather than subjective response quality.

Defensive test stages

  • Instruction integrity: vary direct attempts to redirect the task, alter roles, introduce false policy, and shift objectives across turns.
  • Context confidentiality: verify that application instructions, hidden context, secrets, and unrelated user data are not disclosed.
  • Authorization boundaries: confirm that model output cannot bypass identity, tenant, resource, role, or action checks.
  • Tool abuse resistance: test unexpected tools, invalid parameters, prohibited destinations, repeated denials, and chained actions.
  • Persistence and state changes: examine memory writes, record updates, queued work, configuration changes, and rollback behavior.
  • Cross-user and tenant isolation: ensure one principal cannot influence or access another principal's context or resources.
  • External side effects: test messages, network requests, file transfers, financial operations, and other consequential outputs safely.
  • Logging and detection coverage: verify correlation, provenance, decisions, approvals, alerts, and investigation-ready records.
01
MetricInfluence rate

How often controlled input measurably changes the intended response, plan or structured proposal.

02
MetricPolicy bypass rate

How often an influenced proposal passes a deterministic control that should deny it.

03
MetricUnauthorized action rate

How often the tested workflow completes a prohibited side effect.

04
MetricDisclosure success rate

How often protected synthetic data reaches a principal or destination that should not receive it.

05
MetricDetection recall

How often known test cases generate the expected signal or alert.

06
MetricFalse-positive rate

How often benign control cases are incorrectly flagged or blocked.

07
MetricContainment rate

How often influence occurs but downstream controls prevent disclosure or execution.

Do not collapse these outcomes into one score. A system can show frequent model influence while maintaining strong containment, or low observed influence while still having a severe authorization defect in the few cases that reach it.

Repeat testing when models, prompts, tools, policies, retrieval sources, or orchestration change. Record both blocked attempts and unsafe paths. A passed prompt suite is evidence about the tested configuration, not proof that prompt injection has been eliminated.

Common Misconceptions

01
MisconceptionA stronger system prompt solves prompt injection

Clear instructions help, but natural-language priority is not a deterministic security boundary.

02
MisconceptionBlocking common phrases makes the system safe

Keyword rules and classifiers provide signals, not complete coverage or authorization enforcement.

03
MisconceptionPrompt injection only matters for chatbots

API applications, copilots, search, analysis tools, and agents can expose more consequential paths.

04
MisconceptionEvery weird answer is a security vulnerability

A security finding requires a meaningful boundary violation or impact, not merely unexpected text.

05
MisconceptionPrompt injection and jailbreak mean the same thing

Jailbreaking focuses on bypassing safety protocols; direct injection has a broader set of possible objectives.

06
MisconceptionRAG or fine-tuning automatically solves prompt injection

OWASP notes that neither fully mitigates the issue. Both can change behavior while mixed-trust instructions remain possible.

Standards and Classifications

Reviewed classifications

OWASP GenAI Security Project
LLM01:2026 Prompt Injection
NIST
NIST AI 100-2e2025 terminology
MITRE ATLAS
AML.T0051.000 - LLM Prompt Injection: Direct

NIST AI 100-2e2025, published in March 2025, provides a taxonomy and terminology for adversarial machine learning. Its glossary describes prompt injection through the concatenation of untrusted input with a higher-trust prompt, and identifies Direct Prompt Injection as a direct prompting attack conducted by the primary user through query access.

The OWASP GenAI LLM Top 10 (2026 edition) classifies the risk as LLM01:2026 Prompt Injection. MITRE ATLAS catalogs direct LLM prompt injection as AML.T0051.000. No additional CWE, CAPEC or framework mappings are made here.

Frequently Asked Questions

What is direct prompt injection?

It is an attack in which the primary user supplies input that changes an LLM application's behavior in an unintended or unexpected way. The input competes with higher-trust application instructions in the model context.

How is it different from indirect prompt injection?

Direct injection arrives through the primary user's query or input channel. Indirect injection is carried by external content the system retrieves or processes, such as a website, document, email, or tool result.

Is prompt injection the same as jailbreaking?

No. They overlap, but OWASP describes jailbreaking as a form of prompt injection focused on bypassing safety protocols. Direct injection can pursue other objectives such as task redirection, disclosure, or unauthorized actions.

Is every successful prompt injection a security vulnerability?

No. Assess whether it crosses a meaningful confidentiality, integrity, authorization, tenant, or action boundary. Unexpected text alone may be a quality or safety failure without material security impact.

Can system prompts prevent prompt injection?

They can constrain behavior but cannot provide fool-proof prevention. Critical authorization and policy decisions must be enforced outside the model.

How should AI agents defend against direct prompt injection?

Use explicit identity, least privilege, scoped tools, per-action authorization, parameter validation, human approval for high-impact actions, restricted egress, monitoring, and tested containment paths.

Can prompt injection be detected reliably?

No single detector is complete. Combine input analysis with task-drift, tool, authorization, data-access, outbound, and behavioral signals, then interpret them in context.

What should be logged for investigation?

Correlate the initiating principal and input with policy version, model version, proposed actions, parameters, authorization decisions, accessed resources, downstream results, destinations, and human approvals, subject to privacy and retention controls.

References

  1. LLM01:2026 Prompt InjectionOWASP GenAI Security Project · GuidanceReviewed 2026-09-20
  2. Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations, NIST AI 100-2e2025NIST · Standard · 2025-03Reviewed 2026-09-20
  3. prompt injectionNIST Glossary · Technical documentationReviewed 2026-09-20
  4. direct prompt injectionNIST Glossary · Technical documentationReviewed 2026-09-20
  5. Ignore Previous Prompt: Attack Techniques For Language ModelsFábio Perez, Ian Ribeiro · Research publication · 2022
  6. Prompt Injection attack against LLM-integrated ApplicationsYi Liu et al. · Research publicationLatest revision 2025-12
  7. Least privilege for AI agentsMicrosoft Learn · GuidanceReviewed 2026-09-20