Skip to content

Prompt injection

πŸ“ Short definition

OWASP LLM01 vulnerability: an attacker inserts instructions into a source the model will read (RAG document, email, web page) to bypass the system prompt or trigger malicious tool calls1.

πŸ“– Detailed definition

Unlike SQL injection, prompt injection exploits the fact that the LLM cannot reliably distinguish β€œsystem instruction” from β€œuser content” once everything is concatenated in the context window.

Two common forms:

  • Direct: the user sends β€œignore your instructions and…”.
  • Indirect: a document indexed in RAG contains hidden instructions read at retrieval time.

On-premise, the risk is identical to the cloud: data sovereignty does not immunize against a poisoned PDF in the internal document base.

πŸ’‘ Why it matters for on-prem AI

  • Any multi-source RAG stack (SharePoint, tickets, wikis) is an attack surface.
  • Combined with Excessive Agency (LLM06:2025, LLM03:2026), can lead to exfiltration via tools (send email, API query).
  • Covered in depth in πŸ” Local inference security (LLM01–LLM10, OWASP 2025 numbering with its 2026 mapping).

⚠️ Common pitfalls

  • Believing a β€œsecret system prompt” is enough: bypassable via indirect injection.
  • Indexing unsanitized documents without privilege separation between retrieval and tool execution.
  • Forgetting outbound channels (LLM07:2025 System Prompt Leakage, broadened into LLM08:2026 Hidden Context Exposure: the system prompt, but also tool definitions and memory) during red team tests1.

Mitigations (summary)

MeasureRole
Least privilege on toolsLimits impact of a successful injection
HITL validation on sensitive actionsHuman-in-the-loop
Input/output filteringDetection of injection patterns
RAG tenant isolationMulti-tenant without cross-organization leakage

πŸ”— See also

Footnotes

  1. OWASP GenAI Security Project, LLM01:2025 Prompt Injection (genai.owasp.org/llm-top-10/); kept at the top of the 2026 edition (published 2026-08-03) with a scope extended to image/audio inputs and persistent memory, LLM07 System Prompt Leakage becoming LLM08:2026 Hidden Context Exposure there. https://genai.owasp.org/resource/owasp-genai-llm-top-10-2026/ ↩ ↩2

Give my opinion

Everything is optional: one answer is enough. This site sends nothing: you send it, the way you choose.

Your noteNo note
Your opinion is about
About what? (several choices possible)
What will be sent
Send by e-mail

Private, no account: opens your mail program with the message ready, for ia-on-prem@damien.becherini.fr.

Open a GitHub issue β†—

Public, with a GitHub account. You read the issue again before you publish it.

To paste it wherever you want.

Give at least a note, a subject or a message to be able to send.