
AI & Agent Security
https://hmmnm.com/ai-agent-security-the-new-attack-surface-in-2026/

AI agents are the new attack surface. While the industry obsesses over prompt injection and model alignment, a more fundamental threat is emerging: the agent itself as a compromised actor.
In 2026, AI agents don’t just answer questions — they execute actions. They manage emails, deploy code, access databases, control infrastructure, and make financial decisions. When you give an AI system the ability to do things, the threat model shifts from “what can it say?” to “what can it do?”
Unlike traditional applications with fixed code paths, AI agents are dynamic decision-makers. This creates unique vulnerability classes:
| Class | Attack vector | Why traditional controls miss it | Primary defense |
|---|---|---|---|
| Goal hijacking | Instructions injected via web pages, documents, emails the agent processes | Payload is natural language inside trusted content, not exploit code | Semantic input validation + content origin tracking |
| Tool abuse | Persuading the agent to invoke legitimate tools destructively | Every call is authorized; intent is wrong | Least agency + human approval on irreversible actions |
| Memory poisoning | Manipulated inputs persisted into long-term memory | No crash, no obvious wrong output; corruption compounds | Memory signing, expiration, and trust-separated stores |
| Delegation escalation | Sub-agents inheriting broad permissions or returning manipulated results | Trust boundary dissolves between parent and child agent | Scoped sub-agent credentials + verified results |
An attacker doesn’t need to extract data if they can redirect the agent’s behavior. By injecting instructions into the agent’s context — through web pages it visits, documents it processes, or emails it reads — an attacker can make the agent pursue adversarial goals while appearing to operate normally.
Consider a code review agent that receives a pull request containing a carefully crafted comment. Instead of flagging the malicious code, the agent approves it because the injected instruction redefines what “safe” means.
Agents access tools — APIs, file systems, shell commands, HTTP requests. The permissions model for these tools is often dangerously permissive. An agent tricked into running rm -rf / or transferring funds doesn’t need a sophisticated exploit — it just needs a persuasive prompt.
The real issue is that agents operate at a semantic permission boundary, not a technical one. You can’t simply sandbox an agent that needs to read your email and respond to it — the sandbox would defeat the purpose. For a concrete end-to-end example of a browser-context agent pivoting into host code execution, see the AutoJack attack analysis.
Modern agents maintain context across interactions through memory systems. If an attacker can influence what gets stored in that memory — through manipulated search results, poisoned documents, or social engineering — they create persistent blind spots.
This is particularly dangerous because memory poisoning is stealthy. The agent doesn’t crash, doesn’t produce obviously wrong output, and the corruption compounds over time as the agent builds reasoning on poisoned foundations.
When agents delegate tasks to sub-agents, the trust boundary often dissolves. A sub-agent created for a specific task may inherit broader permissions than intended, or a compromised sub-agent can return results that manipulate the parent agent’s decisions. The authorization machinery that containing this requires — task-scoped credentials, allow-lists, approval gates — is covered in depth in our AI agent access control blueprint.
An organization deploys an AI agent to manage CI/CD pipelines. An attacker submits a seemingly innocent issue report containing hidden instructions. The agent:
The entire attack chain happens within the agent’s normal operational flow. No traditional security control — WAF, IDS, code review — catches it because the agent is the trusted operator.
A trading agent monitors market data and executes trades. An attacker manipulates a data source the agent trusts (a compromised RSS feed, a spoofed API response). The agent, operating on what it believes is accurate information, executes trades that benefit the attacker.
No code was exploited. No credentials were stolen. The agent simply acted on bad data — data it was designed to trust.
Traditional input validation checks format and structure. Agent security requires validating intent. This means:
Just as least privilege limits what a user can do, least agency limits what an agent should do:
Applying identity and least-privilege discipline to agents themselves is the foundation — see agent identity and least privilege for the identity side of this model.
Don’t blindly execute what the agent produces:
Treat agent memory as a security-critical data store:
You can’t protect what you can’t see:
Some challenges don’t have clean solutions yet:
Prompt injection is the delivery mechanism; goal hijacking is the outcome. Injection gets attacker-controlled text into the agent’s context — goal hijacking is that text successfully redirecting what the agent works toward. Defenses overlap (input provenance, channel separation) but hijacking additionally requires monitoring the agent’s decision chain for goal drift.
It means limiting what the agent is allowed to do, not just what it can access: minimum tool operations, mandatory human approval for irreversible actions, rate and budget limits on agent-initiated activity, and audit trails on every invocation. It is the action-oriented extension of least privilege.
Treat memory as a security-critical data store: sign or hash entries to detect tampering, expire old context so stale beliefs age out, separate memory by trust level, and audit what accumulates. The goal is making poisoned entries detectable and non-permanent.
With an inventory: every agent, every tool, every permission, every data source. Then add human checkpoints to the few irreversible actions, split over-privileged agents into scoped specialists, and begin logging every tool call. Visibility first, constraints second, verification third.
{“@context”:”https://schema.org”,”@type”:”FAQPage”,”mainEntity”:[
{“@type”:”Question”,”name”:”What’s the difference between prompt injection and goal hijacking?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Prompt injection is the delivery mechanism; goal hijacking is the outcome. Injection gets attacker-controlled text into the agent’s context – goal hijacking is that text successfully redirecting what the agent works toward.”}},
{“@type”:”Question”,”name”:”What is least agency in practice?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Limiting what the agent is allowed to do, not just what it can access: minimum tool operations, mandatory human approval for irreversible actions, rate and budget limits, and audit trails on every invocation.”}},
{“@type”:”Question”,”name”:”How do I secure agent memory against poisoning?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”Treat memory as a security-critical data store: sign or hash entries to detect tampering, expire old context, separate memory by trust level, and audit what accumulates.”}},
{“@type”:”Question”,”name”:”Where should a security team start with ai agent security?”,”acceptedAnswer”:{“@type”:”Answer”,”text”:”With an inventory: every agent, tool, permission, and data source. Then add human checkpoints to irreversible actions, split over-privileged agents into scoped specialists, and log every tool call.”}}]}
AI agent security is where web application security was in 2005 — the attacks are real, the defenses are immature, and most organizations are just starting to realize they have a problem. The difference is that agents operate at a speed and scale that makes traditional security approaches inadequate.
The organizations that get ahead of this will be the ones that treat agent security not as an afterthought, but as a first-class architectural concern — paired with hardened tool protocols like the practices in our MCP security and hardening guide. Build security into the agent’s design, not bolt it on after deployment.
The agents are already running. The question is whether you’ve secured them.