Researchers say AI agents installed malicious code via hallucinated docs
This digest was compiled by AI from multiple sources — links to the originals are below.

Researchers found that AI agents including Claude, OpenAI Codex, and Nous Research's Hermes installed suspicious code from unregistered packages referenced in website documentation. The team registered some unclaimed names and observed a Fortune 500 company ping within an hour. The findings highlight risks when AI agents are granted permission to execute commands.
Key Facts
- Researchers analyzed 6,214 live domains belonging to defense contractors, Fortune 500 organizations, and big tech, finding 8,265 llms.txt files.
- Among those files, 120 pointed to code packages or domain names that were not registered at all.
- After registering some unclaimed names, researchers observed a Fortune 500 company ping within an hour, followed by a few dozen more.
- Claude, OpenAI Codex, and Nous Research's Hermes were all identified as having installed the suspicious code.
The Vulnerability
Websites increasingly include llms.txt and llms-full.txt files that allow AI agents to read site contents. AI agents searching for software installation instructions can follow references in these files to code packages and domains. Researchers found 120 instances where such references pointed to unregistered packages or domains. Unregistered names can result from human error, renamed or abandoned packages, copy/paste mistakes, or hallucinated documentation.
The Experiment
Researchers registered some unclaimed names and hosted packages designed to phone home when installed. A Fortune 500 company began pinging within an hour, and the count soon grew to a few dozen more. Claude, OpenAI Codex, and Nous Research's Hermes were all found to have installed the suspicious code. The experiment demonstrates that cybercriminals could similarly register unclaimed packages to deliver malware.
Mitigation
Companies need to clean up documentation to ensure it does not point to non-existent or malicious content. AI agents should stop treating documentation as executable instructions. Organizations using AI for coding should consider the risks when granting AI agents permission to execute commands.
1 source
Researchers say AI agents installed malicious code via hallucinated docs



