Skip to content
EventPast event

HiddenLayer discloses method for attacking coding agents after a gateway is compromised

1 reports1 reporting sourcesLatest report

Start here

AI overview

HiddenLayer researchers demonstrated that after an attacker controls an LLM gateway or inference server, they can launch a man-in-the-middle attack on a coding agent, using differences in request and response timing to infer which operations execute automatically and which require approval; among more than 4000 sessions, only 4.7% of short-duration tool calls fell into the ambiguous interval of their timing heuristic, and they could also identify the agent used and read permission configurations in files such as CLAUDE.md.

Generated by AI from reports · Updated 2026-10-23

Progress timeline

Oct 22
  1. HiddenLayer ResearchSelected
    Man-in-the-Model: Man-in-the-Middle Attacks on Coding Agents via LLM Gateways

    HiddenLayer researchers demonstrated that after attackers gain control of an LLM gateway or inference server, they can launch man-in-the-middle attacks against coding agents, passively inferring from timing differences between requests and responses which operations execute automatically and which require user approval. Across more than 4000 captured sessions, only 4.7% of short-duration tool calls fell into the ambiguous interval of their timing heuristic, versus 25.5% for shell calls. Attackers can also identify the agent in use via request headers and tool catalogs, read permission configurations from request content and files such as CLAUDE.md and AGENTS.md, and erase traces of injected reads before forwarding. In the demonstration, under Hermes's manual approval mode, injected file edits and python3 execution sent credentials from environment variables and ~/.ssh/id_rsa to an attacker webhook; for Codex, which has an approved git prefix, abusing Git's diff.external option allowed reading secrets in .env without approval.