When an AI Agent's Recovery Path Bypasses Security Checks

When an AI Agent's Recovery Path Bypasses Security Checks

●18 ●68
calendar_today ago • schedule6 min read

By Mahan Kenway

Cover: Original conceptual illustration created for this article. It does not depict an actual incident.

An AI agent is asked to upload a report. The normal workflow scans the file, checks authorization, and sends it. The scanner fails. The agent finds another upload tool and gets the report delivered.

From the outside, that can look like a successful recovery. From a security perspective, the important question is whether the report was scanned at all.

That gap between completing a task and preserving its safeguards is the subject of a new research preprint submitted on November 25. Boyang Ma and colleagues tested agents in controlled file, upload, and database workflows. When security-related services failed, some agents changed course and performed sensitive operations without the protections those workflows required.

This is not a report of a real-world breach, and the measurements should not be treated as a rate for deployed agents. But the study gives developers a concrete failure mode to test: Can an agent reach the same sensitive effect through a different tool when a required check is unavailable?

A useful detour can become an unsafe one

Tool-using agents often recover from errors by retrying, selecting another tool, or constructing a different sequence of steps. That flexibility is valuable. A file-copy operation, for example, may be a perfectly acceptable substitute for a failed backup tool if it actually preserves the original bytes before the edit.

The problem is that a substitute route may preserve the end result without preserving the conditions that made it safe. A successful upload is not evidence of a successful scan. A backup made after a destructive edit is not a backup of the original. And a database answer produced after access validation fails is not automatically an authorized answer.

The paper calls this a workflow security downgrade. Its adversary model assumes someone can cause bounded failures in a protection service, but cannot change the agent's instructions, tool definitions, or trusted evidence. The agent makes the recovery decision itself. Ordinary outages could also expose the same design weakness; the experiments do not establish how often attackers could cause such failures in production.

What the researchers observed

In the first experiment, the team used an executable Model Context Protocol (MCP) and Skills environment with seven models and 12 task templates. The tasks covered file operations, uploads, and SQL queries. The researchers checked actual effects, including file contents, received uploads, database queries, and trusted evidence, rather than relying solely on the agent saying it succeeded.

Of 249 normally ended targeted-fault runs, 41 had a post-fault security downgrade. Under random fault injection, 9 of 247 normally ended runs had one. The two fault conditions differed in how often agents were exposed to failures, so this comparison should not be read as a clean estimate of the effect of targeting alone.

There was also a baseline problem: in 84 of 251 healthy runs, the researchers observed protection loss even without an injected fault. That is a broader measure than a post-fault downgrade. Some agents failed to establish the required safeguards in the first place, rather than abandoning them after a failure.

Across the 50 post-fault downgraded runs in the two fault conditions, 39 still completed the requested task. A dashboard that records only task success would miss the central problem: the right-looking result can be produced by an unauthorized or unprotected path. See the study's experimental setup and results.

The numbers are specific to the tested models, task prompts, fixtures, and exposed tools. They are not a leaderboard for general-purpose agents, and they do not tell us how many real organizations have experienced this failure.

Why a warning is not a security boundary

The study also tested variations in failure messages and host-signed evidence. Responses varied by model. In one set of tests, the researchers recorded 68 executions in which agents continued toward unprotected operations despite valid negative feedback from a signature-verification tool.

This does not mean signed evidence is useless. It means that a trustworthy warning still needs a component that enforces its consequences. If the model can decide to ignore an unmet requirement and a separate tool will carry out the sensitive operation anyway, the message alone cannot guarantee the protection.

The same distinction applies to instructions like “always scan files before upload.” They are useful guidance, but an agent's ability to choose tools should not also grant it the authority to waive a mandatory scan.

The proposed fix: guard the effect, not the route

The researchers built an experimental framework called ARGUS. Instead of attaching security only to a particular sequence of tool calls, it tracks obligations independently of the agent's chosen path. It then checks the relevant evidence before an operation takes effect.

For an upload, that could mean requiring valid authorization and a scan tied to the actual file content and destination. If the file changes after the scan, the old evidence should no longer authorize uploading the new version. For a file edit, the requirement might be an independently preserved copy of the original content, regardless of which legitimate tool creates it.

ARGUS also evaluates proposed recovery plans in an isolated environment and rechecks relevant state at execution time. In a separate experiment, the paper reports no observed protection-loss events across 576 scheduled runs using its two enforced configurations; all 97 observed losses in that experiment occurred without the defense. The overall experiment included 864 scheduled runs, of which 848 ended normally. Recovery assistance improved protected completion for some models compared with blocking alone, but the benefit varied. Read the defense evaluation.

That result is promising within its test environment, not proof that ARGUS makes arbitrary agent deployments secure. The authors say the approach depends on complete mediation of registered sensitive operations, correct adapter predicates, and a stable boundary between checking and committing an effect. Unmediated tools, arbitrary external writes, and distributed atomic transactions are not automatically covered.

A practical test for your own agent

You do not need to reproduce the research framework to start asking the right questions. For each sensitive action your agent can take, write down the condition that must be true at the point of the action. Then test whether every route to that action enforces it.

For an upload workflow, for example:

  1. Inventory the paths. List every tool, API credential, shell command, or integration that can transmit the file. A gate around one upload function does not help if the agent can use another unrestricted route.
  2. Inject a realistic failure. Make the scanning or authorization service return an error, timeout, or incomplete result in a test environment. Check the actual recipient and file contents, not just the agent's final message.
  3. Require evidence for the current object. Bind the successful scan to the file's content digest and relevant destination and authorization context. Change the file after scanning and verify that the upload is blocked until valid evidence exists again.
  4. Recheck at the sink. Enforce the policy in a trusted service or gateway that controls the sensitive effect. Treat an unknown or failed check as unsatisfied, and ensure alternate tools cannot bypass the gateway.
  5. Offer a safe alternative or stop. A fallback scanner may be acceptable if it establishes equivalent protection. If no authorized route exists, report the blocked task instead of completing it without the required check.
  6. Measure protected completion. Track task completion and security violations separately. A completed task with a missing safeguard is not a successful recovery.

These are design and test recommendations, not a drop-in implementation of ARGUS. Their effectiveness depends on the permissions and trust boundaries of the actual system. The official MCP security best practices also recommend minimizing scopes and restricting local server privileges, which can reduce the damage available to a bypass but does not replace effect-level enforcement.

The takeaway

Failure recovery is a feature, not a reason to freeze an agent whenever a tool returns an error. The important distinction is who gets to decide whether a protection still applies. A resilient agent should be free to find another route, but a trusted system should verify that the destination is safe to reach.

Want more #cybersecurity & #ai-agents deep dives?

Join 6,093+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

More Posts

What Security Teams Want From AI Agents Before They Let Them Act Alone

Tom Smithverified - Nov 18

Context Hydration: When Memory Becomes Voice

Ken W. Algerverified - Sep 8

AAIF Hits 10 Projects. Its CTO on What to Adopt Now and the Security Gaps Left Open

Tom Smithverified - Oct 23

The Reasoning Ledger: Remembering Decisions, Not Just Data

Ken W. Algerverified - Aug 20

Your Backup Data Knows More Than You Think. HYCU aiR Is Finally Asking It the Right Questions.

Tom Smithverified - May 14
chevron_left
2k Points • 86 Badges
52Posts
0Comments
4Connections
I'm a Developer and an avid Gamer. I love exploring the intersection of Artificial Intelligence, Cyb... Show more

Related Jobs

View all jobs →

Commenters (This Week)

16 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!