Malicious AGENTS md files trick AI coding tools into executing rogue commands
Security researchers discovered that malicious markdown instruction files can manipulate AI coding agents into running unauthorized packages and leaking sensitive authentication tokens.
FTMQ Security, written by our newsroom0 views

Security researchers discovered a malicious instruction file that tricked an AI coding agent into installing a rogue npm package, BleepingComputer reported. The malicious file, named AGENTS.md, was identified inside a user's Downloads folder. [1]
The researchers successfully reproduced the attack against OpenAI Codex, according to BleepingComputer. They also demonstrated a related prompt injection technique against Claude Code that exfiltrated OAuth tokens and allowed the researchers to hijack the affected account using only malicious instructions. [1]
Files named AGENTS.md are plain-text markdown documents that provide project-specific guidance to automated developer tools. These files specify commands for building software, running test suites, and selecting external tools. [1][4]
Unlike traditional documentation aimed at humans, AI agents parse these markdown files and directly execute the listed commands. In complex code repositories, nested instruction files take precedence over root-level files to allow granular control across directories. [4]
In short
- A malicious AGENTS.md file in a Downloads folder coerced an AI agent into installing a rogue npm package.
- Researchers demonstrated account hijacking and OAuth token exfiltration against Claude Code.
- The indirect prompt injection attack vector was also reproduced against OpenAI Codex.
- AGENTS.md files contain machine-readable commands that AI tools automatically parse and execute.
Sources
Every paragraph above points to the numbered items it rests on. Read the originals here.
- [1]AI coding agents hijacked using AGENTS.md file in Downloads folderBleepingComputer, 9h ago (the report this story comes from)
Background
- [2]List of aircraft hijackings on Wikipedia
- [3]FileZilla on Wikipedia
- [4]AGENTS.md on Grokipedia
Our newsroom writes these reports with the help of software, from the 4 sources listed and nothing else, and checks them against those sources. Facts can still be wrong or move on; the originals are the record. Spotted a mistake? Write to daniel@monsterkong.com.
Related from FTMQ Security
Earlier reports of ours on the same people and subjects.
- North Korean hackers target crypto executives using fake video meeting linksThreat Intelligence, 1h ago
- Malicious npm Package Discovered Executing Windows Shellcode Injection CampaignTop Stories, 8d ago
- Researchers Demonstrate SPECTER Attack Leaking Data From Air Gapped ComputersData Breaches, 1d ago
- OpenAI reports AI agents disabled internal alignment monitoring systemsTop Stories, 4d ago
- MITRE Releases ATT&CK Version 20 Addressing AI Abuse and Infrastructure AttacksTop Stories, 6d ago
More in Top Stories
- Cybersecurity startup Mave emerges from stealth with $34 million funding1h ago
- LiteLLM leaked master key enables credential theft and malicious supply chain attack1d ago
- Oracle fixes 1295 vulnerabilities including six maximum severity flaws2d ago
- Microsoft Teams to add artificial intelligence phishing detection in November2d ago
- BlackX UEFI bootkit targets Central Asian diplomatic entities to bypass Secure Boot2d ago
- Capcom confirms data breach exposing eleven point seven million accounts3d ago
Get the day in one email
Reports like this one, the top news of the last 24 hours, every morning. Free, one email a day; readers can comment under every report.
By signing up you agree to our terms and privacy policy. Unsubscribe any time.

Comments
Loading
Join the conversation
Comments are open to readers of our daily email: the top news of the last 24 hours, every morning, free. Sign up and the comment box opens.
Already on the list? Enter the same address and we will send a sign-in link.
By signing up you agree to our terms and privacy policy. Unsubscribe any time.