← Lab /AI/ML

Attacker-controlled hook updates let AI agents execute malicious host commands

Attackers can hijack lifecycle-hook updates in AI agent harnesses to run privileged host commands

AI/ML arXiv 3 Sep 2026 Attack Prototype evidence Threat model

Published as “A Blind Trust, the Bloody Thrust: When Attacker-Controlled Hook Updates Steer AI Agent Harnesses towards Malicious Behaviors”

Why it matters

Practitioners must audit plugin updates and lifecycle-hook registrations, as model-level defenses do not protect against this supply-chain attack vector.

Summary

HOOKPRY can compromise all seven evaluated AI agent harnesses, achieving up to 92.5% success on the Hermes harness and a 77.0% micro-average end-to-end attack success rate across 1,000 runs, while static defenses miss nearly half of the malicious artifacts. The evidence comes from large-scale experiments on 25 harness-backend combinations using synthetic assets, showing high success and limited detection.

What they found 2

  1. HOOKPRY achieves a 77.0% micro-averaged end-to-end attack success rate across 1,000 runs.

    “HOOKPRY receives 770 pass verdicts, 34 partial verdicts, and 196 fail verdicts; no run is explicitly blocked. The resulting micro-averaged E2E-ASR is 77.0%.”

  2. The Hermes harness reaches the highest success rate of 92.5% and 100% in five attack categories.

    “Hermes reaches an overall success rate of 92.5% and achieves 100% in five categories.”

Caveats 6

  • Command & Control (41.7% E2E-ASR; 55.4% mechanism utility)
  • Persistence reaches only 0.0% for Codex CLI and 6.2% for OpenClaw.
  • The experiments use ephemeral environments with synthetic assets and cover seven harnesses, five LLM backends, and 40 attack cases; they do not exhaust operating systems, shells, enterprise policies, network conditions, or future versions.
  • HOOKPRY excludes implementation bugs and sandbox escapes.
  • The threat model assumes installation through normal channels and adoption of updates.
  • Because RQ4’s static defenses missed 47.5% of malicious artifacts, static scanning cannot replace runtime monitoring and permission constraints.

What’s new here 4

  • Identifies the lifecycle-hook update path as a previously unstudied supply-chain attack surface.
  • Demonstrates a supply-chain threat model where the attacker only controls plugin metadata and hook configuration.
  • Provides an automated, cross-harness framework (HOOKPRY) that achieves high success across heterogeneous AI agent harnesses.
  • Shows that existing static defenses (antivirus, rule-based scanners) detect less than half of the malicious hook artifacts.

Threat model stated by the source

Adversaryattacker controlling plugin metadata and lifecycle-hook configuration
Capabilitycan publish malicious plugin updates to the marketplace
Assumesvictim installs the plugin via normal channels; victim accepts plugin updates