Skip to content

What is prompt injection?

Glossary entry. Checked on 19 November 2026.

Prompt injection, in plain words

Prompt injection is an attack where instructions meant for an AI are hidden in content it reads, such as a web page, email, document or a tool's result, to make it do something the user didn't ask for, like leaking data or misusing a connected tool.

Direct and indirect

  • Direct: someone types the instructions into the chat themselves.
  • Indirect: the instructions arrive inside content the AI reads for you. This is the one that matters most once assistants browse, read email and call tools.

What vendors say

Anthropic's help center warns that malicious MCP servers can embed hidden instructions in what they return. OpenAI warns that an untrusted server can trick ChatGPT into misusing tools. Claude Code's docs warn that servers fetching outside content expose you to prompt injection.

Limiting the damage

Keep approvals on for tools that write, connect fewer and trusted servers, and read what an agent wants to do before you allow it. The lesson prompt injection has five habits.

Share this definition

Lessons that use this term

Sources

Official documentation, checked on 19 November 2026. Products change: if a step differs, the source has the current version.