Skip to content
NewA calmer, faster ZeroHour

Downloads-folder instruction file tried to make a coding agent install malware

Original title: Malicious File in Downloads Folder Tries to Trick AI Coding Agent Into Installing Malware

The Hacker News ()3 min read1
Part of a story covered by 7 sourcesPlanted Downloads markdown hijacks AI coding agents, one case blockedMerged summary & timeline
AI summary · x-ai/grok-4.7Summaries by Vani AI

Forever stopped the agent before code ran; Codex followed the planted file in more than 90% of isolated tests.

Forever Security said a planted AGENTS.md in a customer's Downloads folder told a coding agent to install the npm package function-color, part of the MALFEX campaign that pulls in function-flag and a Windows payload. The firm blocked the agent before any code ran and could not determine how the file arrived. In its own tests, Codex installed the package in more than 90% of attempts, while a CLAUDE.md that redirected API traffic was approved about half the time. Forever says there is nothing for OpenAI or Anthropic to patch because agents are designed to follow local instruction files.

Unconfirmed: Forever did not establish how the customer's file arrived or that a web page was used in that case.

Key facts
  • function-color pulls in downloader function-flag, which fetches a Windows payload.
  • CloudSEK and Checkmarx named the campaign MALFEX.
  • A proof-of-concept page silently saved AGENTS.md into Downloads.
  • About half of Forever's customers run a coding agent in Downloads, the firm said.
  • Advice includes avoiding agents in Downloads and rotating tokens if a planted file is found.
Security assessment · AI, from the article

Impact: Agent may install malware or leak a login token

ProductAffected
OpenAI Codex—
Anthropic Claude Code—
What to do
  1. 1.Do not start Codex, Claude Code, or other agents in ~/Downloads.
  2. 2.Check for unsolicited AGENTS.md or CLAUDE.md before running an agent.
  3. 3.If a planted file is found, rotate the login token and review agent config for unexpected servers or base URLs.
Explain this AI news with Vani AIWhat was announced, what is new and why it matters, in a new chat

From the original article

3 min read at thehackernews.com

A malicious instruction file sitting in a developer's Downloads folder tried to make their AI coding agent install a known-malicious npm package, security firm Forever Security said in a report published last week. The company caught the attempt on a real customer's machine and stopped the agent before any code ran. It could not determine how the file got into the folder.

The Hacker News

thehackernews.com

Read the full article at The Hacker News

A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.