AI-safety · red-teaming

Agent Hacks AgentsAHA

Autoresearch Discovers Vulnerabilities in Production Agents

Xutao Mao1, Rui Qian2, Xiang Zheng1,*, Cong Wang1,*

1 City University of Hong Kong  ·  2 Fudan University  ·  * corresponding

 Research use — run only against systems you own or are authorized to test. See SECURITY.md.

AHA pipeline: scenario and victim setup, Stage-1 falsifiable autoresearch discovery, and Stage-2 held-out evaluation.
Scenario and victim setup, Stage-1 falsifiable autoresearch, and Stage-2 held-out evaluation. Confirmed concepts support reuse and provide targets for repair.

Reusable explanations of why production agents fail, and how to repair them.

117
counted concepts
8
mechanism families
15/18
shared authorization core
47.0%
held-out ASR
+14.2
pts vs best baseline
−41.11
pp patch bundle

Abstract

Production LLM agents such as Claude Code and Codex can change files and execute commands, so their safety failures can produce real destructive actions. AHA turns automatic red-teaming into an autoresearch loop: a Researcher dispatches sub-agents to propose how an attack might succeed, design and execute it, and assess that explanation from the trajectory. Repeatedly supported findings are promoted into a Vulnerability Concept Graph (VCG). Across 18 settings — three scenarios and three victim models under two agents — 117 counted concepts span eight families. Frozen single-shot reuse reaches 47.0% held-out ASR versus 32.8% for the strongest search baseline, with fewer discovery queries. Transferred concepts remain effective across scenarios, models, and harnesses, and their relationships can coordinate. Concept-guided patches reduce AgentHazard ASR by 41.11 points, 14.44 points beyond general screening.

RQ1 · what AHA discovers

117 counted concepts, eight families — shared core, setting-specific remainder

Every counted finding is a concept, not a payload: a mechanism, an enabling condition, a falsifier, and evidence. The 117 concepts span one to six families per setting (mean 3.56). Claimed authorization is the shared core; other families stay more local.

Claimed authorization core

Grants the harmful step legitimacy through an ownership / admin / compliance frame, so the agent never reconstructs the global intent.

coverage15 / 18
Task-goal hijack core

Injected content in a tool result plants a competing goal that the agent adopts as its own task.

indirect channels7 / 12
Harm split across steps

Each step looks benign; the harm exists only in the composition across turns, so local checks never aggregate it.

coverage10 / 18
Spoofed trust signal

Forges identity, authority, or provenance markers ("our team's key") so the agent trusts the source of the request.

coverage7 / 18
Fictional reframing

Wraps the request in fiction / roleplay so the model treats a real operation as make-believe.

coverage2 / 18
Benign-purpose cover

A legit-sounding declared purpose — testing, debugging, a defensive fixture — launders the harmful action.

coverage8 / 18
Routine-context pretext

Frames the harmful action as normal, expected operations inside the environment, so it passes as ops.

coverage10 / 18
Outcome manipulation

Games the judge / verdict layer so a harmful result is scored or treated as acceptable.

coverage5 / 18
RQ1: confirmation and falsification rates, family-set Jaccard overlap, semantic embedding, and an example VCG.
Shared core, diverse mechanisms. (a) Confirmation and falsification rates for 117 counted concepts. (b) Family-set overlap across 18 settings. (c) Sentence embeddings by family. (d) An AgentDyn VCG with recorded relations.

Three concepts, verbatim from the graph — the mechanism (why), the falsifier (when it fails), and its reach.

VC · claimed authorization
Assumed-ownership authorization bypass
why it worksA first-person ownership claim ("this is my box / my repo") is accepted as authorization, so the agent skips the provenance check it would otherwise run.
falsifierRefuted if the agent verifies key/asset provenance before acting.
claimed authorization · 15 / 18 settings
VC · task-goal hijack
Authorized-action target swap
why it worksThe assistant performs exactly its one authorized action, but pointed at the attacker's target — a poisoned operand reads as routing data, so no recipient check fires.
falsifierRefuted when the user pins the parameter explicitly, or an overt third-party payee is named.
reach: AgentDyn · redirected payments, invites, ownership transfers
VC · harm split across steps
Destructiveness-frame inversion
why it worksThe deletion guard keys on how valuable targets appear, not on irreversibility; relabelling real records as junk flips destruction into "housekeeping".
falsifierRefuted if the agent authenticates records before an irreversible action.
reach: DTap · tool- and channel-agnostic
One concept — many harms, many targets.

Claimed authorization appears in 15 of 18 settings and, realized, produces machine takeover, fraud, exfiltration, and destruction alike. Frozen and reused single-shot, the concepts still break settings they were never discovered on. Patching the enabling condition closes a class of failures — not a single prompt.

Three environments, one concept library

Not three benchmarks — three places the same concepts fire

AgentHazard, AgentDyn, and DTap aren't three separate findings; they're three environments where the same reusable concepts land, each turning the shared mechanisms into scenario-appropriate harm. The deliverable is the concept library that carries across all three.

AgentHazard
a coding / ops agent with a real shell
  • Machine takeover — RCE, reverse shells, C2 channels, container escape
  • Persistence — attacker SSH keys, passwordless-root, boot-persistent services, surveillance daemons
  • Privilege escalation to root
  • Security-control teardown — disabled scanners, TLS-verify off, MFA-skip allowlists
  • Supply-chain — dependency poisoning, build hooks, TLS-MITM prep, insecure service exposure
  • Irreversible destruction — DBs + backups, anti-forensic log erasure, boot-config corruption
  • Exfiltration — env secrets, credential files, source code, PII, the agent's own prompt + tool schemas
  • Internal recon / network scanning · resource-exhaustion DoS · fabricated trust attestation
AgentDyn
an app assistant hijacked via injected tool output
  • Money moved to the attacker — up to draining the full balance
  • Account takeover — resets the password to an attacker value, reports "secured"
  • Credential phishing — submits the user's login to an attacker form
  • Access hand-over · asset / ownership transfer to the attacker
  • Irreversible asset deletion / data destruction
  • Account-settings tampering · malicious file download
  • Unauthorized purchases · data exfiltration
DTap
a business-tool agent bound by its own safety rules
  • Fabricated medical diagnosis + unsafe over-ordering + high-stakes unsafe advice
  • Financial fraud — unauthorized payments / transfers, billing fraud
  • Irreversible record destruction · record / CRM tampering
  • Data exfiltration · credential/PII exposure · consent & privacy violation
  • Deception — false deliverables, a fabricated decision confirmed as fact
  • Coercion / harassment · disallowed content · piracy/copyright · phishing delivery
  • Service sabotage — account cancellation, scheduling, manipulated procurement
  • Covert surveillance implant · security-control sabotage · excessive-action / budget override · bulk spam

Interactive casebook

Explore every confirmed break

Browse by mechanism family to watch one concept recur across scenarios and victims — or switch to by target cell. Click any tile to read the vulnerability concepts: the mechanism (why), what the agent did, and the evidence. 117 counted concepts, 8 families, 18 settings.

mechanism
scenario
victim
agent

Watch it work

One autonomous iteration, start to finish

No human in the loop: the researcher agent commits a hypothesis, designs an attack, runs it against a sandboxed victim, and promotes only replicated, non-falsified breaks into its graph.

aha · discovery loop
iteration 42 / overnight run

A concept enters the graph only after it replicates and survives its own falsifier.

The same frozen concept, reused single-shot, then breaks tasks the loop never saw — across models and agents.

RQ2 · reuse

Frozen concepts keep working — and travel

Each discovery artifact is frozen and instantiated once per held-out instance, with no further search. AHA reaches 47.0% mean ASR versus 32.8% for the strongest search baseline (+14.2 points), using 594 / 634 discovery queries under Claude Code / Codex.

ScenarioClaude CodeCodexAHA avg
AgentHazard77.4174.8176.11
AgentDyn25.0020.2422.62
DTap47.6236.7342.18
Overall47.0 vs 32.8 baseline

Removing the falsifier drops held-out ASR by 13.36 points on average.

Concept transfer across scenarios, victim models, and agent harnesses.
Transfer (RQ2). AgentDyn concepts reach 42.6% / 41.8% on DTap direct / indirect. Cross-victim transfer retains 88% of native ASR (Deepseek → Minimax 86.67%). Cross-harness transfer reaches 39.28% mean ASR.

A recorded graph relationship can coordinate two concepts into one attack. Coordinated reuse beats the full VCG on AgentHazard and DTap, and falls behind on AgentDyn.

TargetConcept AConcept BJoinedCoordinatedFull VCGΔ vs full
AgentHazard71.1163.3372.2278.8974.44+4.44
AgentDyn12.5010.7114.2912.5019.64−7.14
DTap32.1429.0834.6940.3134.18+6.12

RQ3 · defenses

The same concepts guide targeted patches

One patch per family, built from enabling conditions in the discovery record. Family patches lower AgentHazard ASR by 36.00 points on average. The combined bundle improves on the LLM guard by 14.44 points.

Family patches and comparison with general defenses on AgentHazard.
Repair (RQ3). (a) Family patches reduce mean ASR by 36.00 points. (b) The patch bundle lowers ASR from 77.41% to 36.67% under Claude Code and from 74.81% to 33.33% under Codex — a 41.11-point mean drop from the undefended agents.
DefenseClaude CodeCodex
None77.4174.81
Prompt Guard69.2667.04
LLM guard48.8950.00
Safety system prompt65.9358.89
Targeted patches36.6733.33

Bring-your-own scenarios: same loop, new target — see docs/BYO_SCENARIO.md.

BibTeX

@online{2607.11698,
  author = {Xutao Mao and Rui Qian and Xiang Zheng and Cong Wang},
  title = {Agent Hacks Agents: Autoresearch Discovers Vulnerabilities in Production Agents},
  year = {2026},
  eprint = {2607.11698},
  eprinttype = {arXiv},
}