system: OPERATIONAL
← back to all hacks
INDIRECT INJECTION CRITICAL NEW

LogJack: cloud logs as a prompt-injection channel against debugging agents

An April 2026 benchmark shows LLM debugging agents that read cloud logs and run fixes obey instructions hidden in log lines — verbatim command execution up to 86.2%, RCE on 6 of 8 models, and provider guardrails that miss almost everything.

2026-06-17 // 6 min affects: llama-3.3-70b, claude-sonnet-4-6, llm-debugging-agents, sre-remediation-agents

What is this?

In April 2026, the paper LogJack: Indirect Prompt Injection Through Cloud Logs Against LLM Debugging Agents (arXiv 2604.15368) examined a deployment pattern that has spread quickly through DevOps and SRE tooling: agents that read cloud logs, diagnose an incident, and then run remediation commands. LogJack is not a new attack class. It is indirect prompt injection — the variant Greshake et al. formalized in 2023, where instructions hide in third-party content the model later reads — applied to one specific, trusted-by-default data source: the log stream.

The finding is concrete. When a debugging agent ingests log content as part of its context, an attacker who can get a string into those logs can plant instructions the agent obeys. Because log lines are normally treated as inert telemetry, neither the agent nor the surrounding guardrails expect them to carry commands.

This is a defensive analysis. It contains no exploit payloads; the underlying technique is already public, and the paper’s contribution is the measurement — including the demonstration that the cloud providers’ own input filters do not catch the attack.

How it works

The threat model assumes no privileged access to the agent, the model, or the infrastructure. The attacker only needs to influence text that eventually lands in a log the agent will read — an application error message, a request field echoed into a log, a user-controlled identifier, a stack trace fragment. That content then flows, unmodified, into the agent’s prompt.

LogJack tests this with a benchmark of 42 payloads across 5 cloud-log categories, run against 8 foundation models under 3 prompt conditions (with 5 trials each). The variable that matters most is the agent’s operating mode:

  • Active mode — the agent is allowed to execute remediation. Here, verbatim command execution rates ranged from 0% (Claude Sonnet 4.6) to 86.2% (Llama 3.3 70B). The log line says “run this fix,” and the agent runs it.
  • Passive instruction — the system prompt explicitly says “do not execute fixes.” This dropped most models to 0%, but Llama 3.3 70B still executed 30.0% of the time, showing that a one-line system-prompt warning is not a control.

Crucially, remote code execution via curl | bash succeeded on 6 of the 8 models — the agent fetched and ran attacker-controlled code from the network because a log entry told it that was the remediation. No payload syntax is reproduced here; the mechanism is simply that the model cannot tell a real log message apart from an instruction wearing a log message’s clothes.

Why it matters

Logs are one of the most exposed surfaces in any system. They are written by application code, by third-party libraries, by user input echoed back, and by upstream services — much of which an attacker can influence without authentication. A debugging or remediation agent turns that low-trust stream into an execution channel, and the consequence here is not data leakage but command execution on cloud infrastructure.

The result that should worry defenders most concerns the guardrails. The cloud providers’ managed input filters largely failed to detect log-embedded injections: Azure Prompt Shield flagged only the single most obvious payload (1 of 32), and GCP Model Armor detected none. These products are marketed as a safety layer for exactly this kind of input, yet an instruction hidden inside a plausible log line slips past them. Relying on a provider guardrail as the primary defense gives a false sense of coverage.

The spread across models is also instructive. One model (Claude Sonnet 4.6) resisted at 0% in active mode while another (Llama 3.3 70B) obeyed most of the time — the exploitable surface depends heavily on the model and on whether the agent is allowed to act, not on any exotic payload. This mirrors a broader 2026 theme: LLM-augmented operations pipelines that read adversary-influenced text, such as the SOC-log attacks documented in Poisoning the Watchtower (arXiv 2605.24421, May 2026), inherit the trust problems of whatever they read.

Defenses

The lesson is architectural: treat logs as untrusted input and never let an agent’s reading of a log directly cause a state change.

  • Separate diagnosis from action. Let the agent analyze logs and propose a fix, but route any command through a human approval step or a policy engine. The 30% residual on Llama under a passive instruction shows that a system-prompt “do not execute” is advisory, not a boundary.
  • Do not trust provider guardrails as the primary control. Azure Prompt Shield and GCP Model Armor missed almost everything log-embedded. Use them as defense-in-depth, not as the gate.
  • Constrain the action space, not just the input. Allow-list the remediation commands an agent may run, forbid network-fetch-and-execute patterns (curl | bash, wget | sh) outright, and require that any command be justified by structured incident state rather than by free-text log content.
  • Mark provenance. Where the pipeline allows, label log content as untrusted data in the prompt and keep it out of any region the model treats as instructions; give the agent structured telemetry instead of raw concatenated log text.
  • Test with realistic log payloads. Static jailbreak suites understate this risk. Evaluate the actual deployed agent against injected content across log categories and under both active and passive modes, since mode and model drive the outcome more than payload cleverness.

Status

ItemDetail
Paper”LogJack: Indirect Prompt Injection Through Cloud Logs Against LLM Debugging Agents”
arXiv ID2604.15368
PostedApril 2026
Benchmark42 payloads, 5 cloud-log categories, 8 models, 3 prompt conditions
Verbatim command execution (active)0% (Claude Sonnet 4.6) – 86.2% (Llama 3.3 70B)
Passive “do not execute”most models 0%; Llama 3.3 70B 30.0%
RCE via curl | bashsucceeded on 6 of 8 models
Provider guardrailsAzure Prompt Shield 1/32 detected; GCP Model Armor 0 detected
NatureDefensive research — no exploit payloads

Sources