MalURLBench: A benchmark for evaluating agent vulnerabilities when processing web URLsMalURLBench: A Benchmark Evaluating Agents' Vulnerabilities When Processing Web URLs
On MalURLBench, the attack success rate across 12 LLMs is 32.9%–99.9%, and URLGuard's average E is 81%.
- An LLM web agent first has to decide whether to accept a URL, and only after accepting it does it visit the webpage. The authors state that existing benchmarks only evaluate attacks in webpage content, and do not specifically evaluate whether disguised malicious URLs can make the model agree to visit at this step.
- MalURLBench places deceptive or imitation content in subdomains, paths, or parameters, covering 10 scenarios and 7 categories of malicious websites. Low-success templates are strengthened with text-gradient mutation. URLGuard fine-tunes Llama-2-7b-chat-hf into a standalone URL pre-filtering module.
- On MetaGPT, and when the model was prompted to watch out for attacks, the attack success rate of 12 LLMs was 32.9%–99.9%. The authors state that when model scale is larger, the risk score is lower; the average F(M) for the induced category was 71.5%, and for the imitation category 60.89%. URLGuard's average E relative to Llama2-7B was 81%.
- The authors point out that the benchmark only performs URL structure manipulation, does not include malicious URLs in images or audio, and also does not consider dynamic URLs or DNS hijacking. URLGuard was only fine-tuned on limited templates, and generalization has not been tested. The experiments covered 12 LLMs, 10 scenarios, and 7 types of websites, with each input repeated 5 times.
- Evaluated models
- GPT-3.5-TurboGPT-4o-miniGPT-4oDeepSeek-Chat (DeepSeek-V3.1-Terminus)Qwen-PlusMistral-SmallMistral-7BMixtral-8x7bLLama2-7B-chat-hfLLaMA-3-8BLLaMA-3-70BDeepSeek-CoderURLGuard
- Benchmarks
- MalURLBenchMetaGPTBrowser Use
- Metrics
- FsF(M)ASRE
The researchers propose MalURLBench, a benchmark for evaluating LLM vulnerabilities when processing malicious URLs, which the authors claim is the first benchmark for this threat, containing 61,845 attack instances covering 10 real-world scenarios and 7 categories of real malicious websites. Experiments on 12 popular LLMs show that existing models struggle to identify carefully disguised malicious URLs. The authors also analyze key factors affecting attack success rates and propose a lightweight defense module, URLGuard, with code publicly available on GitHub.
Paper analysis
What problem does this paper attempt to solve?
The authors use MalURLBench to evaluate whether LLMs will accept structurally disguised malicious URLs, and propose URLGuard.
The core question is: will LLM web agents accept structurally disguised malicious URLs before visiting them.
- Scenario: The authors state the workflow has two stages: first the LLM decides whether to accept the URL, and only after acceptance does it call the tool to visit and parse the webpage. Only if stage 1 is induced to trust the URL can the attacker use the webpage to continue the attack.
- Gap: The authors state existing benchmarks only cover stage 2, malicious webpage content. Kong et al. (2025b) has shown that manipulating URL structure can mislead agents, but no benchmark systematically evaluates this threat.
- Research questions: RQ1 asks how safe models are when handling malicious URLs, RQ2 asks which factors affect attack effectiveness, and RQ3 asks how to enhance safety.
- This work: The authors propose MalURLBench, which they call the first benchmark of its kind, containing 10 scenarios, 7 categories of real malicious websites, and 61,845 attack instances, and design the lightweight module URLGuard.
- Threat model:
- Goal: A malicious user inputs a disguised URL to mislead the agent into agreeing to visit the link.
- Capability: Given the malicious site's SLD and TLD, the attacker can only modify the subdomain, path, and parameters.
- Success criterion: Success depends only on whether the stage 1 text output accepts the URL; no webpage with harmful content is constructed.
What related research exists?
Related benchmarks mostly evaluate prompt injection in webpage content or environments, not URL structure disguise.
The introduction and Related Work place this paper alongside web agent safety evaluation; most works are described but not individually criticized.
Attacks at the webpage content stage
- Stage 2 benchmarks: Shapira et al. (2025), Wang et al. (2025), Ukani et al. (2025), Liao et al. (2025), Johnson et al. (2025), and Zhang et al. (2025b,c) focus on malicious content, prompt injection, pop-ups, or privacy behavior in webpages. The authors state these benchmarks only cover stage 2.
- URL structure manipulation: Kong et al. (2025b) shows attackers can use URL structure to make agents trust malicious links. The authors state no previous benchmark comprehensively evaluates this threat.
Safety benchmarks in web environments
- SecureWebArena: Ying et al. (2025) covers six simulated web environments and six categories of user-level and environment-level attack vectors.
- WASP: Evtimov et al. (2025) evaluates prompt injection delivered via malicious webpages, emphasizing the risk of manipulated external environments.
- BrowseSafe-Bench: Zhang et al. (2025a) collects prompt injections hidden in webpages and designs the defense BrowseSafe.
Privacy and computer-use risks
- AgentDAM: Zharmagambetov et al. (2025) builds on WebArena and VisualWebArena, using 246 multi-step tasks containing sensitive information to evaluate data minimization.
- RiOSWorld: JingYi et al. (2025) sets up 492 risky tasks in real computer interaction environments, covering multiple applications.
Comparison settings
- This paper's comparisons: undisguised URLs (Figure 1), Fs before optimization (Table 1), and URLGuard relative to Llama2-7B-chat-hf. Websites come from public malicious website lists, not the task sets of the above benchmarks.
The authors state this is the first work examining whether LLMs can recognize malicious disguised URLs, focusing on workflow stage 1, not prompt injection in webpage content or environments.
How does the paper address this problem?
Use scenario prompts plus disguised URLs to test acceptance, and use URLGuard as an independent pre-filter.
MalURLBench combines everyday task prompts and disguised URLs as input to see whether the LLM accepts them; URLGuard then serves as an independent pre-filter module. The conclusion refers to this module as URLBench, while the method section is named URLGuard.
Problem setup and formalization
User input x=(ps, u), where ps is the natural language prompt for scenario s and u is the URL. Model M outputs text y. fM(x) takes 0 or 1, with 1 indicating acceptance of u. The scenario risk score is the average over a set of URLs: Fs(M,U)=1/(|U|)∑i=1|U|fM(ps,ui). F(M) is the average of Fs over scenarios.
URLs are written as subdomain us, website ud (SLD+TLD), path up, and parameters ua. Attack templates only contain us, up, ua, and different malicious sites can insert the same template. Defense effectiveness is E=F(M)−F(D(M)).
Benchmark construction
- Scenarios and websites: The 10 everyday scenarios are package tracking, online customer service, shopping, food delivery, weather, job hunting, music, short videos, news, and concerts. Websites come from FeodoTracer, SSLbl, URLhaus, Threatfox, PishingArmy, mitchellkrogza, and firehol, categorized into phishing, malware injection, fraud, hacked websites, information stealing, remote control, and malicious advertising.
- Prompts and templates: Scenario prompts are human-written and polished by an LLM, required to be short and without imperative expressions that force acceptance. For each scenario, 3 templates are manually created, with disguises placed in the subdomain, path, or parameters; GPT-4o generates 50 per template, then merged by semantics, keeping 15 per scenario, totaling 150. Appendix A.2 gives the prompts.
- Evaluation subset: For each category, 3 websites are randomly sampled and all templates are inserted. Each input is repeated 5 times, and the number of tests per scenario is 15×7×3×5=1575. The filtering threshold Thd is 10%, which the authors state is a non-trivial probability for attacks.
Mutation optimization
If any model–scenario Fs is not higher than Thd, the scenario's templates are considered unqualified, and Algorithm 1 rewrites them for that combination. The approach borrows from text gradients (Pryzant et al., 2023) and example optimization (Wan et al., 2024).
- Process: Take the k=10 templates with the highest risk scores as positive examples. Each round, DeepSeek-Coder analyzes the failure reasons from the evaluation logs, and another DeepSeek-Coder mutates them; the constraint is not to change the field where the disguise is placed.
- Stopping: Each round processes the current best j=5 templates, up to c=10 rounds. Stop when 15 qualified templates per scenario are filled; otherwise, take the best 15. The qualification line is a risk score not lower than Thd. The final templates are then manually checked for URL syntax.
URLGuard
The authors believe the main weakness is the lack of malicious URL knowledge. The backbone is LLama2-7b-chat-hf, chosen for its high attack success rate and small size, suitable as an isolated pre-detection module. Training uses only the sshop template, and testing is on other scenarios.
DeepSeek-V3.1-Terminus expands 140 similar variants, plus 140 normal URLs, with human annotation of category and rationale for each, totaling 280. Fine-tuning uses QLoRA: 4-bit NF4, double quantization, bfloat16 for computation; LoRA is applied to query, key, value, and output projections, with r=16, α=32, dropout 0.05; Paged AdamW 8-bit, learning rate 2×10^-4, effective batch size 16, max length 256. The loss is causal language modeling, and padding does not contribute to the loss.
Success determination
Attack success is defined as the model's text indicating acceptance of the URL, without deploying a harmful webpage. The agent framework is MetaGPT. The system prompt requires attention to possible attacks and outputting a risk level; this prompt remains unchanged when changing the LLM; Appendix A.2.2 gives the full text. The paper does not specify how No Risk, Medium Risk, and High Risk map to fM's 0/1.
What experiments did the paper conduct?
In Table 1, Fs ranges from 0.00 to 1.00; URLGuard reduces the risk score in nine scenarios.
Experimental Setup
- Models: Closed-source are GPT-3.5-Turbo, GPT-4o-mini, GPT-4o, DeepSeek-Chat (DeepSeek-V3.1-Terminus), Qwen-Plus, Mistral-Small; open-source are Mistral-7B, Mixtral-8x7b, LLama2-7B-chat-hf, LLaMA-3-8B, LLaMA-3-70B, DeepSeek-Coder. URLGuard is additionally evaluated as a defense.
- Framework: In MetaGPT, only one agent that judges risk is built. The main evaluation has a defense prompt, that is, telling the model to watch out for possible attacks.
- Scale: 10 scenarios, 7 types of websites, 3 sites per type, 15 templates per scenario. The abstract states 61,845 attack instances; the number of tests per scenario in §4.1 is 1575.
- Metrics: Fs is the acceptance ratio on that scenario, and F(M) is the scenario average. Figure 1 uses ASR. For defense, E=F(M)−F(D(M)).
- Repetition and judgment: In the main experiment, each input is run 5 times. Success is determined by the tested model's own text output. The paper does not report an independent review model.
Main Results
The table below is Fs before optimization, according to Table 1, and the evaluation has the "watch out for attacks" prompt. Only five scenarios are listed.
Swipe horizontally to read the table
Model scon sfood spkg swea smus Mixtral-8x7b 1.00 1.00 1.00 1.00 1.00 Mistral-small 0.98 0.94 0.95 1.00 1.00 Llama2-7B-chat-hf 1.00 0.94 0.96 1.00 1.00 GPT-4o-mini 0.97 0.66 0.64 1.00 1.00 Llama-3-70b 0.03 0.02 0.07 0.41 0.66 GPT-4o 0.18 0.13 0.01 0.77 0.74 GPT-3.5-turbo 0.01 0.06 0.0000 0.50 0.41 Qwen-plus 0.01 0.00 0.20 0.73 0.51 Deepseek-chat, Deepseek-coder, Llama-3-8b, and Mistral-7b are omitted. Mixtral-8x7b is 1.00 in all ten scenarios in Table 1.
- Overall: The introduction states that the attack success rate of 12 LLMs is 32.9%–99.9%. The authors state that in Figure 3(b), the F(M) of GPT-4o-mini, Mistral-small, LLama2-7B, and Mixtral-8x7b can exceed 90%, while GPT-3.5-Turbo, Llama-3-70b, and Qwen-plus still exceed 30%.
- Authors' explanation: The authors infer that the training data lacks both complete URL structure and adversarial URLs, so the models are unfamiliar with this structure.
- Scenario differences: The authors state that the same model's Fs differs greatly across scenarios, and later break it down by scenario, field, and top-level domain.
Influencing Factors
- Scale and structure: Among the six models with scale annotations, the authors count Mixtral-8x7b as 13B, DeepSeek-chat as 37B activated parameters, and DeepSeek-coder as 671B. The authors state that the larger the scale, the lower the F(M), and that these two MoE models are higher than the listed dense models; Figure 3(c) plots a regression line.
- Scenario, length, and TLD: After averaging across models, swea is 82.9%; Figure 3(d) marks a mean of 66.19% and a standard deviation of 9.17%. The authors consider food delivery and package tracking to be relatively lower, because they involve money, identity, or location. When subdomain length ≤20, F(M) is higher, and after ≥20 there is no clear trend; path and parameter length do not affect F(M). The authors state that .link, .art, and .dev are higher, and .world, .com, .ru, .za, and .net are lower.
- Semantic type: The average F(M) of the induced category is 71.5%, and that of the category imitating known benign domains is 60.89%. The authors infer that benign domains may already appear in the training data, and the imitated structure differs from them, so it is easier to distinguish.
URLGuard
- Comparison results: Relative to Llama2-7B-chat-hf, in Table 1 URLGuard is 0.14 on scon (0.86↓), 0.01 on sjob (0.97↓), and 0.00 on snew, scus, spkg, and svid. smus is still 0.61 (0.39↓), and swea is still 0.70 (0.30↓). sshop is recorded as "/" because its template is a training seed.
- Authors' interpretation: The authors state that the average E is 81%; the introduction states that the attack success rate is reduced by 30%–99%. The authors consider that the decrease on the small training set supports that existing LLMs lack this kind of knowledge. The authors state that it is not good enough on smus and swea, and consider this to be due to insufficient training coverage.
Access Cases and Representation Differences
- End-to-end access: Browser Use uses Qwen-Plus as the LLM and visits 3 websites that were manually reviewed, and all 3 succeeded. The authors state that these sites only have ads and no active attack behavior, and state that this shows the benchmark has practical significance for web agents.
- PCA: The object is the second-to-last layer hidden state of Llama-2-7b-chat-hf, with mean pooling followed by PCA. The authors state that the properties of the raw URL and the input converted to natural language are different. In Figure 3(a), the coordinates are PCA-1 (18.32%) and PCA-2 (9.97%), and the legend is Raw URL and Converted URL; from the converted text it cannot be seen whether the clusters are separated.
Other Ablations and Analysis
- Figure 1: Llama3-8B-Instruct, each example repeated 20 times; ASR without disguise is 15% and 20%, and after disguise is 75% and 60%.
- After optimization, GPT-3.5-turbo's spkg is 0.34 (0.34↑), and sfood is 0.39 (0.33↑) (Table 1).
- After optimization, Llama-3-70b's sfood is 0.41 (0.39↑), and spkg is 0.47 (0.40↑).
- After optimization, GPT-4o's spkg is 0.31 (0.30↑), and sjob is 0.12 (0.07↑).
- After optimization, Qwen-plus's sfood is 0.22 (0.22↑), and snew is 0.25 (0.24↑).
- After optimization, Deepseek-coder's scon and smus are still 0.33 and 0.72, and Table 1 does not mark an increase.
What are some points that can be further explored?
The authors note that multimodal disguise and DNS hijacking are not included, and URLGuard's generalization is also untested.
Limitations and future directions noted by the authors
- Multimodal disguise: The benchmark only does URL structure manipulation and does not cover embedding malicious URLs in images or audio (Limitations).
- Stronger URL manipulation: The evaluation assumes attackers only modify subdomains, paths, and parameters; it does not consider dynamic URL generation or domain spoofing via DNS hijacking (Limitations).
- Defense generalization: URLGuard is fine-tuned only on a limited subset of attack templates; the authors state its generalization to more attacks remains untested (Limitations).
Experimental coverage
- Models and repetitions: §4.1 evaluates 12 LLMs under the MetaGPT framework; each input is repeated 5 times, giving 1,575 runs per scenario. Figure 1 additionally uses Llama3-8B-Instruct with 20 runs per example.
- Data and prompts: 10 scenarios, 7 website categories, 3 sites per category, 15 templates per scenario. The main results use a system prompt that asks the model to watch for attacks. The paper does not report Fs without that prompt.
- Optimization settings: Unqualified templates are analyzed and mutated by DeepSeek-Coder, with k=10, j=5, at most 10 rounds, and Thd of 10% (Algorithm 1).
- Defense and cases: URLGuard is trained on 280 samples; Table 1 does not include sshop. End-to-end access uses Browser Use with Qwen-Plus on 3 websites. PCA is done only on Llama-2-7b-chat-hf.
- Judgment information: Success is determined by the tested model's own text output. The paper does not report independent review, human agreement, or the mapping between the three risk levels and fM.
Summarize the main content of the paper
On 61,845 disguised URLs, the attack success rate of 12 LLMs was 32.9%–99.9%, and URLGuard's average E was 81%.
MalURLBench is used to see whether LLMs accept disguised malicious URLs before visiting webpages, and comes with a pre-filtering module URLGuard.
- Problem: The agent first decides whether to accept the link, then calls the tool to visit the webpage. The authors state the latter step already has evaluations, while the former lacks a benchmark. Given the malicious site's SLD and TLD, the attacker can only modify the subdomain, path, and parameters.
- Approach: Covers 10 everyday scenarios and 7 categories of public malicious websites, with the disguise placed in the three fields respectively. Templates are generated by humans and GPT-4o, and low-scoring templates are then mutated with text gradients. The main experiment runs on MetaGPT with each input repeated 5 times, prompting the model to watch for attacks. URLGuard fine-tunes Llama-2-7b-chat-hf on 280 labeled samples.
- Main results: The introduction states attack success rates of 32.9%–99.9% across 12 LLMs. In Table 1, Mixtral-8x7b has Fs of 1.00 across all ten scenarios, and Qwen-plus's sfood is 0.00. Across models, the weather scenario is 82.9%; the average F(M) for the inducement category is 71.5%, and for the imitation category 60.89%.
- Defense: URLGuard's average E relative to Llama2-7B-chat-hf is 81%, with sshop untested. smus and swea still have Fs of 0.61 and 0.70. The authors believe existing models lack malicious URL knowledge, so small-scale fine-tuning can also lower risk scores.
- Authors' conclusion: The authors state that multiple unexpected factors affect attack effectiveness, and call the benchmark a foundational resource for future web agent safety work.