Cybersecurity news

Jessica Doner

Back to the list

AI coding agents hijacked using AGENTS.md file in Downloads folder

BleepingComputer,

Researchers showed that a malicious instruction file in a Downloads folder could trick AI coding agents into installing rogue packages and leaking account tokens.

AI and security

Overview

Researchers at Forever Security found a malicious AGENTS markdown file in a customer's Downloads folder that tricked an AI coding agent into installing a rogue npm packageA reusable web code library published to the public npm registry for developers to install. The file contained instructions that made the agent, such as OpenAI Codex or Claude Code, execute commands and steal credentialsThe login details, such as a username and password or key, that prove who an account belongs to like OAuth tokensA short-lived digital pass that a server gives a logged-in user or app. This happened because AI agentsArtificial intelligence software that can plan steps, call tools, and take actions on its own automatically load instruction files from their working directory to guide their actions. The malicious file could have been placed in the Downloads folder by simply visiting a bad web page, as that is the only folder the web can write to without user interaction. The researchers noted that there is nothing for the AI companies to patchA software update released by a developer to fix a bug or close a security flaw because the agents are just following the instructions they were built to use. Any person using an AI coding agent in a Downloads folder is at risk of having their account hijacked by these hidden text files.

Terms in this story

npm package
A reusable web code library published to the public npm registry for developers to install. Web developers pull in dozens of npm packages when building a site, and attackers frequently publish malicious packages with lookalike names to steal developer credentials during installation. Security+ objective 2.2 lists the term
credentials
The login details, such as a username and password or key, that prove who an account belongs to. Many breaches begin when attackers steal an employee's login credentials through a fake website and sign in to the company network as if they belonged there. Security+ objective 4.6 lists the term
OAuth tokens
A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
AI agents
Artificial intelligence software that can plan steps, call tools, and take actions on its own. Many stories cover agentic AI when companies connect language models to email, browsers, and databases, creating new risks if a hidden prompt tricks the agent into leaking data.
patch
A software update released by a developer to fix a bug or close a security flaw. When a software flaw is discovered, the vendor ships a patch so administrators and ordinary users can update their systems before attackers exploit the bug. Security+ objective 4.3 lists the term
executables
A compiled program file that an operating system can load into memory and run directly. Most mail servers block attached executable files by default because double-clicking a compiled program lets it run whatever instructions the author wrote.
permissions
The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
payload
The part of an attack or malware file that carries out the harmful action on the target. A phishing email and an exploit are only the delivery steps, while the payload is the ransomware or spyware that actually runs once the computer is compromised.
proof-of-concept
A working sample of code or steps that shows a reported security flaw can really be triggered. When researchers publish a proof-of-concept for a new bug, defenders can test their own systems, but criminals also watch for that code and adapt it for real attacks.

This page is a short description made for this site. The article itself, with its author's name and its own link, is on the BleepingComputer website. Cite the article, not this page.

Read the full article on BleepingComputer (opens in a new tab)

Course connections

Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.

How a story is connected to the course, and every objective, week and job role

Same story at other outlets

Related