Back to Explorer
Research PaperResearchia:202602.03124[Computer Science > Cybersecurity]

WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents

Xilong Wang

Abstract

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.


Source: arXiv:2602.03792v1 - http://arxiv.org/abs/2602.03792v1 PDF: https://arxiv.org/pdf/2602.03792v1 Original Article: View on arXiv

Submission:2/3/2026
Comments:0 comments
Subjects:Cybersecurity; Computer Science
Original Source:
View Original PDF
arXiv: This paper is hosted on arXiv, an open-access repository
Was this helpful?

Discussion (0)

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!

WebSentinel: Detecting and Localizing Prompt Injection Attacks for Web Agents | Researchia | Researchia