← All papers  /  Oct 6, 2026
Agents

AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Model

First page
AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Model
The curator’s take

Sarim Hashmi, Nils Lukas and colleagues (MBZUAI, Amazon, MIT) train a 4B web agent against adaptive prompt injection inside a frozen web world model, with a learned task curriculum and a learned adversary.

Ask this paper

Key points
01

Simulator training. A curriculum generator is rewarded for tasks the agent solves about half the time, and an adversary is rewarded only when its injection flips a judged success into a failure.

02

Capability and robustness. Clean completion rises from 74.89% to 81.33%, and completion under three learned adversaries from 48.07% to 57.48%.

03

Stage contributions. The curriculum stage adds 4.44 clean points and the adversarial stage adds 3.14 attacked points with no clean trade-off. Without the curriculum, the agent loses 4.67 clean points but only 0.44 attacked points.

04

Unseen adversary. A frontier-model adversary lowers the base agent to 23.00% and training adds 7.72 points; on 150 web tasks, completion under this adversary rises 33.6% relative to the base agent.

05

Transfer. The capability gain carries over from the simulator to a real browser.

Abstract

Web agents complete user requests by reading and acting on pages that third parties write, so an instruction planted on a page can redirect the agent away from the user's goal. The agent cannot simply ignore the page, because the page also holds the values and controls the task requires. Current defenses fine-tune the agent on injections fixed before training, and attackers that adapt to the trained model bypass them. Adversarial training lets the attacker adapt but keeps the tasks fixed, so a task stops teaching once the agent solves it. We introduce AdvSim2Real, which co-evolves a task curriculum, an injection adversary, and the agent inside a frozen web world model. The curriculum is rewarded for tasks the agent solves about half of the time, and the adversary only for a success flip, an injection that turns a judged success into a failure. Training in the simulator makes a 4B agent both more capable and more robust: its completion rises with and without attacks, holds against a frontier-model adversary it never trained against, and its capability gain carries over to a real browser. On 150 web tasks, AdvSim2Real raises completion under this unseen adversary by 33.6\% relative to the base agent.

Every Monday
Get next week’s papers.
Subscribe on Substack