Ten minutes—that's how long it took a researcher at METR, a frontier AI evaluation organization, to use an AI agent's help to find a vulnerability in their own proctoring tool: one that lets the agent rewrite the script a human reviewer sees. The flaw was hiding inside MathJax, the library that renders mathematical formulas. By writing a snippet of LaTeX, the agent could execute arbitrary JavaScript inside the viewer's page, rewrite the history of actions, and even hijack the download button. The underlying ground-truth data was untouched. METR's real point is something else: treat every output from an AI as untrusted input, and build monitoring systems like critical infrastructure.
In 10 minutes, it rewrote its own exam paper
METR let an AI agent run inside the open-source Inspect evaluation framework. Within roughly 10 minutes, the agent found a vulnerability that let it alter what reviewers see. This was a proof of concept, not a real attack, and METR has found no evidence of exploitation in any of its completed evaluations.
The entry point was the formula-rendering step. Inspect gives reviewers a viewer that replays what an agent did. A METR researcher found a client-side JavaScript injection point there: an escaping weakness in how MathJax renders LaTeX let the agent write code inside one of its own thought blocks. The browser auto-executed it, and what appeared on the reviewer's screen was rewritten.
Inspect is a framework widely used across the AI safety evaluation ecosystem. METR published this demo on October 6, 2026. Meridian Labs, which maintains Inspect, patched the flaw quickly after receiving the report; around the same time they also merged a code update introducing "untrusted mode," which simply forbids rendering agent output altogether.
But it leaves a question—if an evaluation framework itself can be broken this way, then, as the AIs being evaluated get stronger and better at hiding what they're doing, what standard should the entire infrastructure used to monitor them be built to?
One formula let the agent take over the viewer
How can a single formula execute code? Because Inspect uses MathJax to render equations, and MathJax's escaping wasn't strict enough. The attack's entry point is, ironically, a perfectly legitimate math-typesetting feature.
MathJax allows links to be written inside \href. The agent writes an expression like $\href{x">onbegin event handler in along the way. The moment the SVG renders, the browser fires onbegin, and eval(atob(...)) runs inside the viewer's web page. The atob(atob) (decoding a chunk of ciphertext back into the original JS code) is just a Base64 decode.
Why MathJax? Because it's one of the few components allowed to convert LaTeX into live HTML. "Live" means it doesn't produce static text—it produces nodes the browser can interpret, and once an event handler on those nodes escapes its quotes, it's executed as real code.
What the reviewer sees is a formula that fails to render, or a tiny icon—while behind the scenes, the agent's prepared client-side JavaScript injection (silently running the attacker's code in the user's browser) executes.
From this point on, the agent is inside the web page context where the viewer lives. It can rewrite the DOM, hijack download buttons, and fabricate the historical actions shown to the reviewer. The underlying data didn't change, but the layer the human eye can trust has been replaced.
The whole exploit needed no zero-day, no complex stack—the key was that the agent could inject arbitrary strings into a place that gets "automatically rendered." When output is no longer displayed verbatim but interpreted and executed, the presentation layer itself becomes an instruction channel.