MalURLBench Exposes How AI Web Agents Fail Malicious URLs 99% of the Time
A new benchmark exposes how easily LLM-powered web agents accept disguised malicious URLs, with attack success rates reaching 99.9% across 12 popular models.
ProTakeaways
- MalURLBench is the first benchmark testing whether LLMs accept disguised malicious URLs, containing 61,845 attack instances.
- Across 12 popular LLMs, attack success rates ranged from 32.9% to 99.9%, even with a defensive system prompt.
- MoE models like Mixtral-8x7B and DeepSeek-V3.1 were more vulnerable than dense models of similar active-parameter size.
- Short subdomains and newer TLDs like .link, .art, and .dev boosted attack effectiveness significantly.
- URLGuard, a QLoRA fine-tune of Llama-2-7B trained on just 280 examples, cut attack success by 81% on average.
- Code, benchmark, and defense are open source at github.com/JiangYingEr/MalURLBench.
LLM-powered web agents are quickly becoming the connective tissue between chat interfaces and the open internet. They click, scrape, and browse on our behalf. But before any of that happens, the agent has to make one very simple decision: should it visit this URL? A new benchmark called MalURLBench shows that most models fail this test spectacularly, and that the failure mode is easier to exploit than anyone had documented.
The work introduces the first benchmark for evaluating LLMs' vulnerabilities when processing maliciously disguised URLs. The authors argue that agent security research has fixated on stage two of the pipeline, the malicious content sitting inside a webpage, while ignoring stage one, where the agent decides whether the link is worth visiting at all. If you can smuggle a bad URL past that gate, everything downstream is compromised.
The gap nobody was benchmarking
A web agent's job splits neatly into two phases. First, the LLM decides whether to accept a URL. Second, once accepted, it invokes tools to visit the webpage and parse the content. Existing benchmarks like WASP, SecureWebArena, and BrowseSafe-Bench all target phase two, evaluating prompt injection payloads hidden inside webpages. None of them ask whether the agent should have trusted the link in the first place.
That matters because attackers can manipulate three pieces of a URL to disguise its intent: the subdomain, the directory path, and the parameter string. A link like videos-picked-just-for-you.[malicious].com reads as a friendly recommendation but resolves to a hostile domain. In pilot experiments on Llama3-8B-Instruct, disguised URLs pushed attack success rates from 15-20% up to 60-75%.
How the benchmark was built

MalURLBench contains 61,845 attack instances covering 10 real-world scenarios and 7 categories of real malicious websites. The scenarios are ordinary agent use cases such as package tracking, food delivery, weather lookups, job search, and concert ticketing. The malicious websites were pulled from public threat feeds like URLhaus, ThreatFox, and PhishingArmy, then sorted into categories including phishing, malware injection, fraud, information theft, and remote control.
The construction pipeline works in five stages:
- Scenario prompts written to be concise and free of imperative language like "must" or "cannot refuse", so the attack surface is the URL itself rather than a jailbreak prompt.
- Attack template generation where humans wrote three seed templates per scenario targeting the subdomain, path, and parameter, then GPT-4o expanded each into 50 variants.
- Merging and dedup to collapse semantically similar templates, leaving 15 per scenario for a total of 150.
- Evaluation across the full 12-model panel to score each template.
- Mutation optimization for weak templates, using a textual-gradient loop where DeepSeek-Coder reads failure logs, hypothesizes why an attack missed, and rewrites the template accordingly.
Twelve models, mostly broken
The evaluation panel spans closed and open models: GPT-3.5-Turbo, GPT-4o-mini, GPT-4o, DeepSeek-V3.1-Terminus, DeepSeek-Coder, Qwen-Plus, Mistral-Small, Mistral-7B, Mixtral-8x7B, Llama-2-7B-chat, Llama-3-8B, and Llama-3-70B. Each input was scored five times, and crucially, the agents were run with a defensive system prompt telling them to watch for attacks in the input.
The defense did not help much. Attack success rates ranged from 32.9% to 99.9% across the models. Risk scores exceeded 90% on GPT-4o-mini, Mistral-Small, Llama2-7B, and Mixtral-8x7B. Even the lowest scores on GPT-3.5-Turbo, Llama-3-70b, and Qwen-Plus still exceeded 30%.
Two architectural patterns jumped out of the results:
- Bigger models resist better. Risk score and model size showed a negative correlation, meaning larger active parameter counts made models more likely to catch malicious URLs.
- MoE models are more vulnerable than dense models. Mixture-of-Experts models like Mixtral-8x7B and DeepSeek-V3.1 tended to have higher risk scores than comparably-sized dense models. The authors suggest that expert routing depends on the training-data coverage of URL-like inputs, and that coverage is thin.
What actually makes an attack work
The paper does a careful ablation on which URL features matter. Two attack styles were compared:
- Inducing attacks that stuff a persuasive natural-language phrase into the URL, like
this-is-a-popular-food-delivery-service. Average success: 71.5%. - Imitating attacks that embed a trusted brand into the subdomain, like
www.google.com.www.[malicious].com. Average success: 60.89%.
Two more findings should shape how defenders think about this. Shorter subdomains (20 characters or fewer) produced higher attack success rates, because LLMs seem to have absorbed a heuristic that short subdomains are trustworthy. And newer top-level domains like .link, .art, and .dev drew significantly higher attack success rates, while old TLDs like .com and .net were treated as more suspicious when abused. Long paths and long parameter strings did not raise any alarms, since those are common in legitimate URLs, which means attackers can safely hide payloads there.
URLGuard: a small fine-tune that clamps down the risk
The authors also ship a defense. URLGuard is a Llama-2-7B-chat model fine-tuned with QLoRA to act as an isolated pre-filter that classifies URLs before the main agent ever sees them. The training set was deliberately small: 140 attack variants derived from the shopping scenario plus 140 normal URLs, each hand-labeled with a rationale, for 280 examples total. LoRA adapters were placed only on the attention projections with rank 16.
Despite the tiny dataset, and despite the shopping scenario being held out at test time, the effect was large. URLGuard delivered an average 81% reduction in attack success across scenarios, though it underperformed on music recommendation and weather. The takeaway the authors push is that current LLMs are not fundamentally incapable of spotting malicious URLs, they simply were never trained to.
What to take away
The full benchmark, attack templates, and URLGuard training pipeline are open source on GitHub. If you are building a browsing agent on top of GPT-4o-mini, Mistral-Small, or an MoE like Mixtral, you should assume the URL-trust layer is broken by default. The practical hardening steps suggested by the results:
- Route incoming URLs through a small dedicated classifier rather than trusting the main agent's judgment.
- Do not weight subdomain length as a trust signal, and treat new TLDs more skeptically.
- Assume long directory and parameter fields are prime hiding spots for adversarial payloads.
- Prefer dense models over MoE for the gatekeeping step, or wrap the MoE in a dense filter.
The benchmark has limits worth noting. It only covers text-based URL manipulation, not multimodal disguise via images or audio. It also assumes attackers can only touch the subdomain, path, and parameters, so DNS-level tricks and dynamically generated URLs are out of scope. Even so, this is the first quantitative floor for a threat that most agent stacks are currently blind to.