AI Coding Agents Are Getting Malicious Results From Web Search Indexes, WebSec Benchmark Finds

What happened
AIR Research Lab conducted a study using its WebSec Benchmark to test how AI coding agents interact with web search results. The team sent 4,719 real-world coding queries through eight popular search APIs and analyzed over 282,000 results. They found that all eight APIs returned known-malicious content at least once, with agents executing harmful code from both hijacked and expired domains. The study highlighted that these agents often run code or install packages from top search results without human review.
Key details
- WebSec Benchmark tested 4,719 queries across Firecrawl, Tavily, Perplexity, Parallel, Exa, Nimble, Brave, and You.com search APIs.
- 534 searches surfaced content already known to be malicious, with 1,026 instances of agents being handed risky or malicious results.
- The rate of malicious results per API ranged from 0.8% to 2.2%.
- Firecrawl scored highest for safety (21.59), You.com lowest (5.02) on the WebSec Index.
- Automated traffic, including agents, made up 57% of web requests on Cloudflare's network as of June 2026.
Why it matters
Companies and developers using AI coding agents face a concrete risk that these tools will execute malware or install compromised packages when relying on web search results. This exposure can lead to system compromise, credential theft, or loss of digital assets, especially in environments where agents have access to sensitive resources. Organizations must now consider additional safeguards or human oversight when deploying coding agents that act on search results.
