WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Xilong, Liu, Yinuo, Wang, Zhun, Song, Dawn, Gong, Neil
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912873600516096
author Wang, Xilong
Liu, Yinuo
Wang, Zhun
Song, Dawn
Gong, Neil
author_facet Wang, Xilong
Liu, Yinuo
Wang, Zhun
Song, Dawn
Gong, Neil
contents Prompt injection attacks manipulate webpage content to cause web agents to execute attacker-specified tasks instead of the user's intended ones. Existing methods for detecting and localizing such attacks achieve limited effectiveness, as their underlying assumptions often do not hold in the web-agent setting. In this work, we propose WebSentinel, a two-step approach for detecting and localizing prompt injection attacks in webpages. Given a webpage, Step I extracts \emph{segments of interest} that may be contaminated, and Step II evaluates each segment by checking its consistency with the webpage content as context. We show that WebSentinel is highly effective, substantially outperforming baseline methods across multiple datasets of both contaminated and clean webpages that we collected. Our code is available at: https://github.com/wxl-lxw/WebSentinel.
format Preprint
id arxiv_https___arxiv_org_abs_2602_03792
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents
Wang, Xilong
Liu, Yinuo
Wang, Zhun
Song, Dawn
Gong, Neil
Cryptography and Security
Artificial Intelligence
Computation and Language
Prompt injection attacks manipulate webpage content to cause web agents to execute attacker-specified tasks instead of the user's intended ones. Existing methods for detecting and localizing such attacks achieve limited effectiveness, as their underlying assumptions often do not hold in the web-agent setting. In this work, we propose WebSentinel, a two-step approach for detecting and localizing prompt injection attacks in webpages. Given a webpage, Step I extracts \emph{segments of interest} that may be contaminated, and Step II evaluates each segment by checking its consistency with the webpage content as context. We show that WebSentinel is highly effective, substantially outperforming baseline methods across multiple datasets of both contaminated and clean webpages that we collected. Our code is available at: https://github.com/wxl-lxw/WebSentinel.
title WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents
topic Cryptography and Security
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2602.03792