Skip to content
Book a conversation

Prompt injection

Influence from inputs or external content that changes a language-model application’s behavior in unintended ways.

Luiz GardelinUpdated Read in Markdown
All terms

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation
On this pageIntroduction

Also used as: language model prompt injection, prompt injection attack.

Prompt injection occurs when an input influences a language-model application to behave in an unintended way. OWASP describes the vulnerability in requests made directly to a model and in external content, such as files or pages the application consults. The problem arises when material received as content improperly influences the application's behavior. OWASP, LLM01:2025.

Direct injection involves input presented to the model. Indirect injection involves material obtained from another source. This distinction matters at work: restricting what someone writes in a conversation does not, by itself, examine the contents of documents the application retrieves. OWASP also recognizes that inputs may cause these effects intentionally or unintentionally. An incorrect answer alone is not proof of an attack. OWASP, injection types.

Impact depends on the application's role and available actions. A text-only system presents different consequences from one that can access records or execute operations. OWASP describes outcomes including inappropriate information disclosure, manipulated responses and unauthorized use of connected functions. OWASP, impacts.

Hypothetical example

An application summarizes documents received from third parties. One file contains content attempting to change the task's routing rules. In a defensive design, the organization treats the file as an information source, restricts the application's access and requires separate authorization for consequential actions. This example identifies the boundary between content and authority.

Examination of controls can consider:

  • Separating and identifying external content.
  • Permissions matched to the authorized task.
  • Checking outputs before they are used in actions.
  • Testing conditions in which the controls may fail.

OWASP presents these approaches as mitigation, without guaranteeing complete prevention. OWASP, prevention and mitigation strategies.

Safeguard bypass describes a more specific objective: making a model disregard safety mechanisms. Data exfiltration describes an adversary's unauthorized removal of information. These events may be related, but the terms do not mean the same thing. OWASP's classification is a voluntary technical reference, rather than law or certification, including for organizations operating in Brazil.

Sources

  1. OWASP, LLM01:2025 Prompt Injection OWASP

    OWASP LLM01:2025: description, direct and indirect forms, mitigation limitations. Voluntary technical reference.

Written by

Luiz Gardelin

Founder and lead consultant at The Company Brain

Luiz Gardelin is the founder and lead consultant at The Company Brain, an AI organizational transformation consultancy based in Brazil. He also founded Webinhood and Tropk.ai.

See all content by this author

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation

Related terms

Continue reading

All resources