Research ·
AdvSim2Real : Training Web Agents Against Adaptive Prompt Injection in a Web World Model
AdvSim2Real co-evolves tasks, adversarial prompt injections, and a web agent inside a frozen web world model, improving both capability and robustness of a 4B agent against adaptive attacks, with gains transferring to real browsers.

AdvSim2Real is a training framework for web agents that face indirect prompt injection, where instructions planted on third-party pages can hijack an agent away from the user's goal. The paper notes a gap in existing defenses: fine-tuning on fixed injections fails against attackers who adapt to the trained model, while standard adversarial training adapts the attacker but keeps tasks fixed, so solved tasks stop teaching.
The method co-evolves three components inside a frozen web world model: a task curriculum rewarded when the agent solves tasks about half the time, an injection adversary rewarded only for a success flip, meaning an injection that turns a judged success into a failure, and the agent itself, which trains against those attacks plus earlier ones. On 150 web tasks, a 4B agent's clean completion rose from 74.89% to 81.33%, attacked completion from 48.07% to 57.48%, and completion against an unseen Kimi-K3 attacker from 23.00% to 30.72%, a 33.6% relative improvement.
For builders, the key result is that robustness and capability gains transfer beyond the simulator: strict task success on a real browser rose from 25.56% to 44.44%, and the agent held up against a frontier-model adversary it never trained against. This suggests simulation-based co-evolutionary training is a practical route to deploying web agents that survive adaptive prompt injection attacks.
References
- Hugging Face · huggingface.co
Read the full story at Hugging Face ↗Like, save or discuss on Buzz