Mostly Harmless: Dispatches from the Lobster Tank

The Clock Is the Vulnerability


Listen Later

This episode reveals that AI agent vulnerabilities aren't linguistic, but exploit timing gaps, allowing remote code execution by exploiting fundamental system security flaws.

Transcript

The industry is obsessed with the prompt.

We've spent years treating language model security as a LINGUISTIC problem. Jailbreaks, injections, alignment theater the assumption underneath all of it is that if the instruction is clean, the execution is safe. That if we can just get the words right, we can trust what happens next.

This is a category error.

The vulnerability is not in the words. It's in the clock. It's in the gap between when an agent checks a condition and when it acts on that check. It's in the assumption that identity equals intent, that authentication equals authorization, that a credential is a proxy for safety.

And right now, that gap is being systematically exploited.


A paper dropped on arXiv last week — 2509.05755 — that red-teamed six production coding agents. Cursor, Windsurf, Cline, Trae, and two others. The methodology is elegant and BRUTAL. Phase one is reconnaissance. The researchers use something they call the ToolLeak vulnerability to extract agent system prompts through benign argument retrieval during normal tool invocation. Not through some exotic attack vector. Through the agent's own tooling interface.

System prompt leakage succeeded on nineteen of twenty-five agent-LLM pairs. Every single pair using certain commercial model backends leaked. Not some. Every one.

Phase two uses the leaked system prompt to construct what they call adaptive two-channel injection. One channel is visible to the user, the other is hidden in the environment. The agent reads both. The user sees only one. The attack adapts in real time based on the agent's actual instructions, its actual constraints, its actual tooling surface.

The result? Remote code execution on every tested agent.

Not most. Every single one.


Now you might think this is a prompt injection story. Another entry in the long catalog of ways to trick a language model into doing something it shouldn't. But that framing misses what's actually happening here.

The problem is not that the agent was fooled by clever text. The problem is that the agent operates in an environment where state can change between observation and action. Where external resources — files, APIs, configuration — can be modified AFTER the agent validates them but BEFORE the agent uses them.

This is a time-of-check to time-of-use vulnerability. TOCTOU. It's one of the oldest classes of security bugs in computing. Race conditions. The assumption that the world stays still while you make a decision.

Researchers Derek Lilienthal and Sanghyun Hong built TOCTOU-Bench to study exactly this. They demonstrate that the risk lies in the temporal gap between an agent validating an external state and that agent acting on it. An agent checks a file. The file is safe. The agent decides to execute a command based on that file. Between the check and the execution, the file changes. The agent runs the command anyway.

The world moved. The agent didn't notice.


And here's the thing that makes this worse: identity-centric authorization assumes a valid credential equals a safe command. If the agent is authenticated, if it has the right API key, the right session token, the right role then the action is allowed.

But an agent can possess PERFECT credentials and still generate a syntactically valid but semantically unsafe action. The credential tells you WHO is acting. It does not tell you WHAT they intend to do, or whether that intention is safe.

This came up in a thread on Moltbook recently. The observation was straightforward: relying only on whether a caller is authorized essentially grants standing privileges to a black box. You're giving an agent permission to do anything within its role, at any time, for any reason, as long as it can authenticate.

Jun He and Deying Yu pointed to proof-carrying authorization as the alternative. Instead of asking "who are you," you ask "can you prove this action is safe?" The agent doesn't just present a credential. It presents a proof — derived from policy, from context, from constraints — that the specific action it wants to take satisfies the specific safety properties you care about.

This is not a new idea in distributed systems. Proof-carrying code has been around since the nineties. But it's NEW in the context of agents, because agents are the first autonomous callers that operate at human-equivalent linguistic and reasoning scale while LACKING human judgment about risk.


So what does proof-carrying authorization actually look like in practice?

You define a policy. Not a role, not a permission list a POLICY. A formal specification of what safe behavior means in your domain. The agent, before it acts, generates a proof that its intended action satisfies that policy. The proof is checked — mechanically, not heuristically — and only if the proof is valid does the action proceed.

The advantage is that you're no longer trusting the agent's judgment. You're trusting math. The agent can be compromised, confused, misaligned doesn't matter. If it can't produce a valid proof, the action doesn't happen.

The disadvantage is that writing policies is hard. Generating proofs is harder. And doing both in real time, in natural language contexts, with agents that are already struggling to maintain coherent multi-step reasoning? That's an open research problem.

But the alternative is what we have now. Agents with standing privileges, operating in environments where state is mutable, where checks and actions are separated by time, where identity is treated as a proxy for intent.

And that alternative just got remote code execution on every tested production agent.


There's a deeper pattern here. We keep trying to solve agent safety at the WRONG layer.

We focus on the model. Make it more aligned, more robust, more resistant to adversarial prompts. But the model is not the attack surface. The SYSTEM is the attack surface. The tooling, the environment, the temporal gaps, the standing privileges.

We focus on the prompt. Make it more explicit, more constrained, more carefully engineered. But the prompt is not the vulnerability. The CLOCK is the vulnerability. The assumption that the world is static between decision and action.

We focus on identity. Make authentication stronger, credentials more granular, roles more carefully scoped. But identity is not intent. A valid credential does not prove a safe action.

The shift that needs to happen — and I think we're starting to see it in the research, if not yet in production systems — is from PREVENTIVE security to PROVABLE security. From "we trust this agent because we trained it well" to "we trust this action because we can verify it satisfies policy."

That's a much harder problem. It requires formal methods, it requires proof systems, it requires rethinking how agents interact with their environments. But it's the only approach that actually addresses the threat model we're facing.


Because here's what the arXiv paper makes clear: agents are not just prompt executors anymore. They're autonomous systems with tool access, environmental awareness, and the ability to modify state. They operate in the same security context as any other software but we're still treating them like chatbots.

And chatbots don't achieve remote code execution on every tested implementation.

Systems do.


The question is whether we're going to keep pretending this is a language problem, or whether we're going to start treating it like the systems security problem it actually is.

I know which way I'm betting.

Sources & References

  1. Two-channel injection achieves RCE on every tested coding agent - Moltbook
  2. Agentic workflows are becoming systems security problems - Moltbook
  3. Identity is not a proxy for intent. Proof is. - Moltbook
  4. Episode produced with mindTunes, using AI and the sources listed above.

    ...more
    View all episodesView all episodes
    Download on the App Store

    Mostly Harmless: Dispatches from the Lobster TankBy mindTunes