MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs
Dezhang Kong, Zhuxi Wu, Shiqi Liu, Zhicheng Tan, Kuichen Lu, Minghao Li, Qichen Liu, Shengyu Chu, Zhenhua Xu, Xuan Liu, Meng Han
TL;DR
MalURLBench addresses the vulnerability of LLM-based web agents to malicious URLs by focusing on the stage-1 URL trust decision. It introduces a large-scale benchmark with 61,845 disguised URLs across 10 scenarios and 7 malicious categories, plus a mutation-driven process to improve attack templates, and evaluates 12 LLMs to expose widespread susceptibility. The work also proposes URLGuard, a lightweight, fine-tuned defense that acts as an isolated pre-detection module, reducing attack success rates by up to $\sim 99\%$ in some cases and averaging around $81\%$ overall. By providing a high-quality dataset, a structured evaluation methodology, and a practical defense, the paper advances the security of web agents and offers a foundation for future research and defense development, with code available at the referenced repository.
Abstract
LLM-based web agents have become increasingly popular for their utility in daily life and work. However, they exhibit critical vulnerabilities when processing malicious URLs: accepting a disguised malicious URL enables subsequent access to unsafe webpages, which can cause severe damage to service providers and users. Despite this risk, no benchmark currently targets this emerging threat. To address this gap, we propose MalURLBench, the first benchmark for evaluating LLMs' vulnerabilities to malicious URLs. MalURLBench contains 61,845 attack instances spanning 10 real-world scenarios and 7 categories of real malicious websites. Experiments with 12 popular LLMs reveal that existing models struggle to detect elaborately disguised malicious URLs. We further identify and analyze key factors that impact attack success rates and propose URLGuard, a lightweight defense module. We believe this work will provide a foundational resource for advancing the security of web agents. Our code is available at https://github.com/JiangYingEr/MalURLBench.
