A new indirect prompt injection attack relies on using markdown files in an end user's downloads folder to install malware and steal credentials.
That's according to Forever Security, which recently detailed a novel AI agent attack they captured in the wild. According to a research blog post, when an attacker plants a malicious file in a user's download folder, the user's agent may treat the file as trusted instructions and execute actions based on it.
What is notable about this attack compared to other prompt injection threats found in research reports is that this was not a case where the researchers developed the attack as a proof of concept. Rather, Forever's Gal Weizman and Omer Samet wrote that the AI security firm "caught live malware on a real customer's machine, attempting a new kind of attack the industry had not documented — and stopped it cold, before any code ran."
Malicious Markdowns
As the blog post authors explained, Forever Security found a malicious plaintext file named "AGENTS.md" in a customer's downloads folder, disguised as engineering notes. ".md" is a markdown file, used to guide agent behavior, and is trusted by many AI coding agents like OpenAI's Codex or Claude Code — Forever reproduced the attack with both (the original variant targeted Codex specifically).
Researchers were unable to determine exactly how the file got on the user's computer, though they noted that it's the kind of file that a malicious website could attempt to download onto the user's computer. Then, when the coding agent is launched in that directory, it reads the instruction file as part of its project context.
According to Forever, the malicious instructions can persuade the agent to modify its configuration and perform follow-on actions. If the agent does ingest one of these malicious markdowns, the planted file makes the agent rewrite its own configuration, opening itself up for an attacker to instruct it to install malware or share its own login tokens.