AI Security | | 2 min read
Prompt injection: the security risk every LLM deployment must plan for
Large language models follow instructions — including ones an attacker hides in a document, email or web page. Here is how prompt injection works and how to reduce the risk.
Sysroot AI Security Team Sysroot Technologies Pvt Ltd

Organisations are moving quickly to put large language models (LLMs) in front of customers and employees: support assistants, internal knowledge search, document summarisation and agents that can take actions. Almost all of them share one weakness that traditional security testing does not catch — prompt injection.
What prompt injection is
An LLM receives instructions and data in the same channel: text. It cannot reliably tell the difference between the instructions its developers wrote and instructions that arrive inside the content it is processing.
There are two forms:
- Direct injection — a user types instructions designed to override the system prompt, such as asking the model to ignore its rules or reveal its configuration.
- Indirect injection — malicious instructions are hidden inside content the model reads: a web page, a PDF, an email or a record in your knowledge base. The user may be completely unaware.
Indirect injection is the more serious risk, because it scales. A single poisoned document can affect every user whose request touches it.
Why it matters more as AI gains capability
When an LLM can only produce text, the impact of injection is limited to misleading output. Once the model is connected to tools — sending email, querying databases, creating tickets, calling APIs — injected instructions can trigger real actions with real data.
The question to ask is not "can the model be tricked?" — it can. The question is "what can a tricked model do?"
Practical controls
No single control eliminates prompt injection. Effective programmes combine several layers:
- Limit what the model can do. Give agents the minimum tools and permissions they need. Read-only access wherever possible.
- Keep humans in the loop for high-impact actions. Payments, data deletion and external communications should require confirmation.
- Treat retrieved content as untrusted. Clearly separate system instructions from documents, and avoid letting retrieved text change the model's goals.
- Filter inputs and outputs. Detect known injection patterns and prevent sensitive data from leaving through responses.
- Log and monitor. Record prompts, tool calls and outputs so misuse can be detected and investigated.
- Test adversarially before launch. Red team the system the way an attacker would, including indirect injection through your real data sources.
How we test LLM applications
Our AI security assessments map to the OWASP Top 10 for LLM Applications and cover the full system — not just the model. We test direct and indirect injection, data leakage, insecure tool use, excessive agency and weaknesses in the retrieval pipeline, then provide prioritised, practical fixes.
If you are preparing to launch an AI feature, speak to our AI security team about testing it first.
Tags | AI Security · LLM · Prompt Injection


