AI Privacy

Prompt Injection Is the Hidden Risk in AI Agents You Connect

Hidden text in emails or webpages can hijack an AI agent, and agencies warn the risk may never fully go away.

On this page
  1. Hidden instructions can ride along with anything your agent reads
  2. Direct and indirect prompt injection work differently
  3. Security agencies warn this risk may never fully go away
  4. Limiting access keeps damage small when an attack works
  5. Questions to ask before you connect an agent to email or the web
  6. Frequently asked questions

Prompt injection is hidden text that tricks an AI agent into ignoring its instructions. Security agencies say it may never be fully fixed, so the safest fix is limiting what your agent can access and do.

Dr. Fangs, the TygerLabs dentist tiger, wearing gloves and inspecting a suspicious note pulled from a stack of papers as a small robot helper looks on

Hidden instructions can ride along with anything your agent reads

Prompt injection tops the OWASP Top 10 for LLM Applications list. OWASP defines it this way: "A Prompt Injection Vulnerability occurs when user prompts alter the LLM's behavior or output in unintended ways." Some of these attacks come straight from a user's own input, while others sneak in through content the model reads, like a webpage, a PDF, or an email. OWASP calls this second kind indirect prompt injection, which happens when an LLM accepts input from external sources, such as "websites or files." For a small business owner, that second kind is the bigger worry. If your agent reads customer emails, uploaded documents, or a vendor's website, it's exposed to instructions you never wrote and never approved.

Direct and indirect prompt injection work differently

Both types aim to hijack an agent's behavior, but they come from different places, and OWASP describes each with a real-world scenario, quoted below.

TypeWhere the instruction comes fromExample
Direct prompt injectionThe user's own input"An attacker injects a prompt into a customer support chatbot, instructing it to ignore previous guidelines, query private data stores, and send emails, leading to unauthorized access and privilege escalation."
Indirect prompt injectionExternal sources, such as websites or files, that the model reads"A user employs an LLM to summarize a webpage containing hidden instructions that cause the LLM to insert an image linking to a URL, leading to exfiltration of the private conversation."

Security agencies warn this risk may never fully go away

You can't patch this once and forget it. The UK National Cyber Security Centre warned in December 2025 that prompt injection attacks "may never be totally mitigated in the way SQL injection attacks can be." That's a strong statement. NIST's adversarial machine learning taxonomy agrees. It notes that indirect prompt injection lets an attacker inject instructions "without directly interacting with the application." These attacks are mounted "not by the primary user of a model but instead by a third party," according to NIST. The danger comes from whatever content your agent decides to read.

Limiting access keeps damage small when an attack works

Since the attack surface can't be closed entirely, OWASP points toward reducing what's at stake. Its mitigations include restricting the model's access privileges to the minimum necessary, using human-in-the-loop controls for privileged operations, and separating and clearly marking untrusted content. Each step shrinks the blast radius of a successful attack. Anthropic, which builds agents that browse the web, echoes this concern. Its team notes that "every webpage an agent visits is a potential vector for attack." Anthropic describes classifiers that scan content as one layer of defense, alongside training and testing. No single safeguard is enough. Combining a few reduces risk.

Questions to ask before you connect an agent to email or the web

Before signing off on any AI agent, work through these steps with your vendor or builder.

  1. Ask exactly what data and systems the agent can access, and whether that access is limited to only what the task requires.
  2. Ask whether a person must approve risky actions, like sending money or emails, before the agent takes them.
  3. Ask how the system separates trusted instructions from untrusted content it reads, such as emails or webpages.
  4. Ask what testing the vendor has done against prompt injection attacks, and what the results showed.
  5. Ask how defenses will be updated as new attack techniques appear.

Our team helps businesses connect AI agents with these guardrails in place. Learn more about our AI systems and agents service.

Frequently asked questions

What is prompt injection in AI agents? Prompt injection is hidden text that tricks an AI agent into ignoring its instructions. The guide says it can come from a user input or from content like a webpage, PDF, or email.

Can prompt injection come from a webpage or email? Yes. The guide says indirect prompt injection can come from external sources the model reads, such as websites, files, and emails.

How do I lower prompt injection risk? Limit what the agent can access and do. The guide also says to use human approval for risky actions and separate trusted instructions from untrusted content.

More in AI for business

Share this post

AI Systems & Agents

AI Automation and AI Systems

Custom AI systems and agents connected to your data and workflows.

See AI Systems & Agents