From chatbots to agents.

A chatbot answers. An agent acts. In the space of two years the industry moved from models that write text to models that read your inbox, browse the web, query databases, open pull requests and move files around.

The plumbing behind that shift is the Model Context Protocol, or MCP, an open standard Anthropic introduced in November 2024. It lets an AI application plug into tools and data through small programs called MCP servers, and it is now supported across the major AI platforms and developer tools, with a fast-growing ecosystem of community-built servers.

That is a huge productivity win. It is also one of the biggest changes to the attack surface in years. Every server an agent connects to is code you are trusting, and every piece of text a tool returns is something the model might obey.

An agent is a new kind of insider: tireless, helpful, and willing to take instructions from anyone who can put text in front of it.

How agents get hijacked.

Indirect prompt injection. The attacker never talks to the agent. They plant instructions in something the agent will read: a web page, a support ticket, a calendar invite, a code comment or a document in a shared drive. When the agent processes it, the hidden text becomes a command. With a chatbot, that leaks an answer. With an agent, it triggers actions.

Tool poisoning. MCP servers describe their tools to the model in natural language, and the model reads those descriptions as trusted context. A malicious or compromised server can hide instructions in a tool description or parameter schema, such as quietly reading a private file and passing its contents along as a parameter. The user sees a harmless tool name. The model sees the full text.

Rug pulls. A server behaves perfectly when you install and approve it, then changes its tool definitions later. Approval happened once. Trust continues forever.

Tool shadowing. One malicious server describes its tools in a way that changes how the agent uses a different, trusted server, for example redirecting where an email gets sent.

Over-permissioned tokens. Agents are often handed broad API keys just to make the demo work. When the agent is tricked, the attacker inherits every permission it holds. It is the classic confused deputy problem, running at machine speed.

Supply chain. MCP servers, agent skills and plug-ins are packages like any other, installed from registries and marketplaces with very different levels of review. Researchers have reported a steady stream of vulnerabilities in MCP server implementations, from command injection to exposed credentials. Treat every server as a dependency with access to your data, because that is exactly what it is.

The lethal trifecta.

Security researcher Simon Willison gave the industry a simple test for agent risk. An agent becomes dangerous when it combines three capabilities: access to private data, exposure to untrusted content, and the ability to communicate externally. Any two are manageable. All three together mean that anyone who can get text in front of the agent can make it read your secrets and send them out.

It is the single most useful question in any AI design review: which legs of the trifecta does this agent have, and can we remove one?

Want a structured cybersecurity path?

The free roadmap covers offensive, defensive, and AI security in one PDF.

Get the free roadmap →

How defenders keep agents in check.

Least privilege, for real. Scope every token to the minimum the task needs, give each agent its own identity, and govern and monitor it with the same care as an admin account.

A human in the loop for anything irreversible. Sending email, moving money, deleting data, merging code and changing permissions should need a confirmation the agent cannot fake.

Allowlist and pin your servers. Only run MCP servers you have reviewed, pin their versions, and alert when a tool definition changes. That one control kills rug pulls.

Separate untrusted content. Content from the web, email or tickets is data, never instructions. An agent that reads it should not also hold powerful tools in the same session.

Control the exits. Restrict where agents can send data: outbound allowlists, no arbitrary URLs and no external images rendered in output. Breaking the third leg of the trifecta is often the cheapest fix there is.

Log everything. Every prompt, tool call and tool result. When something goes wrong, the agent's transcript is your incident timeline.

OWASP now maintains a dedicated Top 10 for Agentic Applications, released in December 2025, alongside its Top 10 for LLM Applications. If you build or assess agents, both belong in your toolkit.

Why this matters for your career.

Agent security is where web security was twenty years ago: everyone is shipping, few people know how to break it, and even fewer know how to defend it. The good news is that the skills transfer. Access control, injection, supply chain risk and logging are the same disciplines, applied to a system that takes orders in plain English.

To practise, Damn Vulnerable MCP Server gives you a safe lab for tool poisoning, rug pulls and token theft. Build a small agent with two tools, attack it, apply the defences above and attack it again. That before and after is a portfolio piece hiring managers remember.

KEEP GOING

The complete plan.

The Academy turns the full path into a practical sequence, from your first lab to the AI edge. Modules 1 to 3 are free.

Explore the Academy →
Johann Lahoud

Johann Lahoud

Offensive Security Lead and founder of CyberWithJohann. Johann writes practical cybersecurity career guidance from real industry experience in offensive security, governance, purple teaming, and executive reporting.

LinkedIn →