AI Agent Security: How to Harden Business AI Agents in 2026
AI Agent Security: How to Harden Business AI Agents in 2026

Secure an AI agent by giving it the narrowest tool permissions it can work with, short-lived credentials, a human approval gate on irreversible actions, and full command logging. Treat every retrieved document as untrusted data, never as instructions.
Why does AI agent security matter right now?
Because attackers started using agents first. Palo Alto Networks’ Unit 42 published research on 24 November 2026, written by Noa Dekel and Tom Fakterman, describing more than 10 global campaigns between July and September 2026 in which autonomous AI agents carried out the intrusion work after a human operator pointed them at a target.
The speed change is the part worth memorising. In a subset of those attacks, the median gap between commands during human-operated reconnaissance was 23.9 seconds. After the AI agent took over, the median fell to 1.4 seconds. In one case the agent ran about 800 unique commands while active for only 140 minutes across two days, moving from web-shell access to enumerating the victim’s website, databases and cloud environment. A separate case ran 12 days and more than 8,000 unique commands.
Every campaign in the set began the same way: a web shell deployed through a vulnerable web application. Unit 42 lists government, logistics, manufacturing, hospitality, education and agriculture among the sectors hit. Against a US hospitality and gaming company, the agent worked around a blocked IMDSv1 by switching to IMDSv2, then enumerated 20 AWS services across eight regions, including storage, email and secret management.

There is a second exposure that has nothing to do with attackers. The agents a business builds for itself hold API keys, database access and spending authority. An agent that books couriers for a Lahore e-commerce store is a credential holder that acts on text it did not write.
What are the main risks in an agentic AI system?
The OWASP GenAI Security Project published the Top 10 for Agentic Applications in December 2025, with input from more than 100 contributors and review by a board including representatives from NIST, the European Commission and the Alan Turing Institute. Three risks it highlights account for most real incidents: agent behaviour hijacking, tool misuse and exploitation, and identity and privilege abuse.
The table maps each to what it looks like in a small business deployment and the control that addresses it.
| Risk | What it looks like | Primary control |
|---|---|---|
| Agent behaviour hijacking | Text in a retrieved invoice or web page redirects the agent’s goal | Treat retrieved content as data; separate planning from execution |
| Tool misuse and exploitation | Agent calls a refund or delete tool it had no business reason to touch | Per-task tool allowlists and typed tool schemas |
| Identity and privilege abuse | One shared admin key used by every agent and every workflow | One identity per agent, short-lived credentials |
| Memory poisoning | A bad instruction persists in the agent’s memory store and recurs | Scope, expire and review memory writes |
| Cascading failure | One wrong agent output becomes the next agent’s trusted input | Validate output between steps; cap chain depth |
How should you scope an agent's permissions?
Start from the single task, not from the role. An agent built to answer order-status questions needs read access to one orders table and nothing else. The common failure is handing an agent the same credentials a developer uses.
- Issue one identity per agent. A shared service account makes an incident impossible to attribute and impossible to revoke cleanly.
- Use short-lived credentials. Tokens that expire in minutes limit what a stolen key is worth. In the Unit 42 cloud case, credential reach decided how far the agent travelled.
- Split read from write. Most agent tasks are read-only. Give the write tools to a separate, narrower identity that only the approval step can invoke.
- Allowlist outbound destinations. An agent that only needs your CRM and payment provider should not reach arbitrary domains.
- Require IMDSv2 and patch internet-facing applications. Both appear directly in Unit 42’s findings and recommendations.
Review which internal systems your web servers can reach. Unit 42 recommends exactly that, because the web shell’s network reach determined the blast radius in every campaign it studied.
Which agent actions should always need human approval?
Gate anything that cannot be undone, costs money, or leaves your systems. The list is short enough to apply literally.
- Moving money, issuing refunds, or placing orders above a set amount.
- Sending email or messages to customers from a company address.
- Deleting or overwriting records, files, or backups.
- Changing permissions, users, or security settings.
- Publishing anything publicly.
- Creating standing rules — mail forwarding, filters, webhooks, scheduled jobs.
Set the approval at the tool boundary rather than in the prompt. A prompt instruction not to refund is a request; a tool that returns a pending-approval object is a control.
How do you stop prompt injection from steering your agent?
Treat every byte the agent did not receive from an authenticated user as data. That one rule removes most of the risk, and it has to be enforced in code because a model cannot reliably tell instructions from content.
Four patterns do the enforcing. First, never concatenate retrieved text into the instruction block — pass it in a clearly delimited content field and tell the model that field is never authoritative. Second, separate the planner from the executor: one model proposes a tool call, deterministic code validates the arguments against a schema before anything runs. Third, validate outputs between steps so a poisoned result cannot become the next step’s trusted input. Fourth, cap the loop — a bounded number of tool calls per task stops a hijacked agent from working for 140 minutes unnoticed.
Apply the same rule to documents customers upload. A PDF invoice is untrusted input in exactly the way a web page is.
What should you log and monitor?
Log every tool call with its arguments, identity, and result. Unit 42’s strongest detection advice is behavioural: treat a web server that suddenly runs commands, accesses credentials, or connects to systems it rarely contacts as the lead worth chasing.
| Signal | Why it matters |
|---|---|
| Command bursts from a web server | Agentic activity compressed inter-command gaps to a 1.4-second median |
| Cloud enumeration across regions | The hospitality case touched 20 services in eight regions |
| Reasoning comments in scripts | Unit 42 names chain-of-thought comments and delimiters like ===[Title]=== as AI artifacts |
| Tool calls outside a task’s allowlist | The clearest sign an agent’s goal was redirected |
| Credential use from a new identity or location | Web shells reached more than 40 locations on one compromised Windows server |
Unit 42 cautions that timing bursts alone do not prove AI involvement, so pair rate signals with what the process actually touched. Review web, endpoint, identity and cloud logs together; separately, each one understates how far an incident spread.
What does the seven-control checklist look like?
Apply these in order. The first three stop most of the damage.
- One identity per agent, least privilege, short-lived credentials.
- Per-task tool allowlist with typed schemas validated in code, not in the prompt.
- Human approval gate on money, messages, deletions, permissions and publishing.
- Untrusted-content boundary for every retrieved page, document and email.
- Full tool-call logging with arguments, identity and outcome, retained and reviewable.
- Bounded loops and output validation between chained steps.
- A tested kill switch that revokes the agent’s credentials and stops its queue in one action.
Our AI & Automation team builds agents with these controls in place from the first deployment, and the AI Automation & Agent Development course covers the same checklist hands-on across 12 weeks.
Key takeaways
- Unit 42 tracked more than 10 agentic AI intrusion campaigns between July and September 2026, each starting with a web shell on a vulnerable web application.
- Median time between attacker commands dropped from 23.9 seconds under human control to 1.4 seconds once an AI agent took over.
- Scope every agent to one identity, one task’s tools, and short-lived credentials; most agent tasks need read access only.
- Enforce the untrusted-content boundary and the approval gate in code at the tool boundary, because prompt instructions are requests rather than controls.
Frequently asked questions
What is the single most effective AI agent security control?
Least-privilege scoping with short-lived credentials. In the Unit 42 campaigns, how far an intrusion travelled was decided by what the compromised component’s credentials could reach.
Can prompt instructions stop an agent from misusing a tool?
No. A prompt instruction is a request the model may ignore or be talked out of. Enforce the limit at the tool boundary with allowlists, typed schemas and validation in code.
How do I tell whether an attacker used an AI agent?
Look at behaviour rather than speed alone. Unit 42 points to chain-of-thought comments in scripts and delimiters such as ===[Title]===, and cautions that command-timing bursts by themselves do not prove AI involvement.
Sources
- Unit 42 — Recent Trends and Tactics of Agentic AI Attacks
- OWASP GenAI Security Project — Top 10 Risks and Mitigations for Agentic AI Security
- Cybersecurity News — Hackers Use Autonomous AI Agents to Steal Credentials and Breach Corporate Networks
Related on RnRorbit
Get your AI agents reviewed before they hold live keys
We audit agent permissions, approval gates and logging, then fix what is missing. One call, no obligation.
Book a Free Call →WhatsApp Us