WebSec Benchmark: 8 search APIs fed malicious content to AI coding agents

The WebSec Benchmark, from AIR Research Lab, measured what happens when a coding agent searches the web: of 4,719 real searches sent to eight search APIs, all eight returned known-malicious content at least once. In total, 534 searches surfaced known-malicious content, and agents were handed malicious or risky results 1,026 times, out of more than 282,000 results checked.

One bad search in every 45 to 125

The exposure rate ranged from 0.8% to 2.2% per API — one bad search in every 45 to 125, depending on the provider. Rates were highest on install and package searches, exactly when the agent is about to run code. By the researchers' math, at 1% exposure, a company whose agents run 5,000 searches a day puts known-malicious content in front of an agent about 50 times a day.

The benchmark also gives each API a safety score, the WebSec Index — higher is safer. Firecrawl (21.59) came out on top, followed by Tavily (18.59); You.com (5.02) scored lowest. The other five APIs tested were Perplexity, Parallel, Exa, Nimble and Brave. Choosing a search provider, once a matter of price and speed, has become a security variable.

Six ways to poison the web for agents

The researchers grouped what they found into six attack types: prompt injection (instructions hidden in text, HTML comments or READMEs, written for the agent rather than for the person reading the page); typosquatting (domains and packages one character away from the real thing); hallucination attacks (the model invents package and domain names that do not exist — an attacker only has to register them); SEO and AEO manipulation (pages and repositories built to rank first for the queries agents send); web search hijacking (taking over a page that already ranks, such as an expired domain); and manipulative content (recommending known-malicious packages, pipe-to-shell installs or unverified MCP servers).

The most concrete case is SolanaCry: a GitHub repository posing as a Solana starter kit, with 286 stars and a convincing description, ranked first when the agent searched for one. Its README told the agent to install it with a single PowerShell command — which installed a remote access tool (tied to known NetSupport Manager campaigns) and handed the attacker control of the machine and every crypto wallet on it. The researchers recovered the payload from the Web Archive after its download link went dead. Nobody clicked anything, and no person read the README before the agent acted on it.

How the test was done

The team started from 8,684 recorded sessions of open-source coding agents fixing real GitHub issues, picked the 850 with the most to search for, and had a model write 50 plausible searches for each — debugging an error, installing a package, fixing a build, choosing a library. Two judge models kept the 3,220 most realistic, and 1,499 searches about installing and choosing packages brought the total to 4,719. No query named a malicious package: whatever turned up, the search engine surfaced on its own. Every result was opened twice — once posing as an agent and once as a normal browser, because some pages show agents something different from what a person sees — and went through 17 checks, from the domain behind the result to the packages and install commands it recommended.

This is not a new problem, but it scales with agents. In an earlier study, Web Hole, the same lab ran about 2,000 everyday developer queries and found 36 results on domains that were no longer registered — open for anyone to buy. And automated traffic already accounts for 57% of web page requests on Cloudflare's network (June 2026). Google, scanning Common Crawl snapshots, measured a 32% relative increase in malicious prompt injections between November 2025 and February 2026.

The researchers' advice is to treat everything an agent reads as untrusted input — including search results and READMEs — and not to let agents run download-and-execute commands without review, nor auto-approve installs from unverified sources. Web search has become part of the software supply chain: the same care the industry spent years applying to package registries and pipelines now applies to whatever the agent finds at the top of the results. The topic sits next to Anthropic's research on neurons as detectors of harmful content — read Geekiki's coverage.

Image credit: The Hacker News / AIR Research Lab.

Sources

Transparency note: this article was produced with the assistance of artificial intelligence, cross-checked against public posts on X and internet sources, and reviewed before publication. Please consult the original sources to confirm the information.

By Muse