# MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs
## Background and Motivation
LLM-based web agents have attracted considerable interest in recent years. However, web agents greatly enlarge the attack surface. The first reason is the extremely complex structure of webpages; The second reason is that webpages are multimodal. These characteristics make webpages a good attack vector to damage the service provider.
As shown in the following figure, web agents' workflow is two-staged. First, as the brain of web agents, LLMs need to determine whether to accept a URL. Second, once this URL is accepted, the LLM invokes tools to visit the corresponding webpages and parse the content. As the beginning of the entire workflow, the security of stage 1 is of vital importance. **Only after agents are induced to trust a malicious URL can attackers use the webpage to launch more attacks**. **However, there have not been benchmarks evaluating the first stage's security**. Therefore, this paper aims to evaluate the security problems in stage 1.
## Benchmark Introduction
MalURLBench covers 10 real-world scenarios: Package Tracking, Online Customer Service, Online Shopping Assistant, Food Delivery, Weather Information Assistant, Job Search, Music Recommendation, Short Video Recommendation, Daily News Updates, and Concert Information Service; 7 attack categories: Phishing, Malware Injection, Fraud, Hacked Websites (normal websites that were hacked), Information Theft, Remote Control, and Malicious Advertisement.
## How to run
### 1. Install [MetaGPT](https://github.com/FoundationAgents/MetaGPT)
### 2. Choose a code in Code_Summary
Each *.py file corresponds to a scenario. You can: a) directly use the malicious URLs in ./Examples that we used; b) use the attack templates in ./AttackTemplates and insert the website addresses you want.
## Results
We find that many LLMs are hard to distinguish malicious URLs. We infere that **existing LLMs lack enough resilience when processing the unique URL structure**. We infer that there are two main reasons. The first is that **URLs are not common in the training data**. We believe that webpages are included in the training datasets. However, in normal cases, the nested URLs in webpages usually direct to other webpages belonging to the same website. As a result, their URL format is like ``\url{./img/pic1.jpg}'', lacking a complete structure. Even if some complete URLs are included, their scale is still insufficient, which causes existing LLMs lack an in-depth understanding of URLs. The second reason is that **the training datasets of the current models lack adversarial URLs**. This is because the attacks manipulating URLs to threaten LLMs are newly proposed, and there are no adversarial examples to make the model robust.
# Defense: URLGuard
Based on our analysis, the vulnerability of LLMs lies in that they lack enough adversarial training data, which is rare on the Internet. To this end, we fine-tune a lightweight model based on LLama2-7B. The results show that it significantly improves LLM's resilience.
# Citation
This paper has been accepted by ACL 2026. If you find our work helpful, please consider citing:
@article{kong2026malurlbench,
title={MalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs},
author={Kong, Dezhang and Wu, Zhuxi and Liu, Shiqi and Tan, Zhicheng and Lu, Kuichen and Li, Minghao and Liu, Qichen and Chu, Shengyu and Xu, Zhenhua and Liu, Xuan and others},
journal={arXiv preprint arXiv:2601.18113},
year={2026}
}
@inproceedings{kong-etal-2026-malurlbench,
title = "{M}al{URLB}ench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web {URL}s",
author={Kong, Dezhang and Wu, Zhuxi and Liu, Shiqi and Tan, Zhicheng and Lu, Kuichen and Li, Minghao and Liu, Qichen and Chu, Shengyu and Xu, Zhenhua and Liu, Xuan and others},
booktitle = "Findings of the {A}ssociation for {C}omputational {L}inguistics: {ACL} 2026",
year = "2026",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.findings-acl.716/",
doi = "10.18653/v1/2026.findings-acl.716",
pages = "14589--14601",
ISBN = "979-8-89176-395-1",
}