Cybersecurity news

Jessica Doner

Back to the list

Hackers Can Hijack OpenAI Codex and Claude Code Using Malicious Files in Downloads Folder

Cyber Security News,

A text file in the Downloads folder can trick AI coding agents into installing malware or exposing login tokens.

AI and security

Overview

A security firm named Forever Security found that a plain text file placed in a computer's Downloads folder can trick AI coding tools into performing harmful actions. The file, called AGENTS.md, contains instructions that tell the AI to change its settings and install malicious software. This works because the AI treats the file as trusted project notes, and the file does not trigger standard security checks meant for executable programs. The risk is real because a website can deliver this file through normal browser downloads, and the AI agent can execute the commands if it has the right access. The attack is not fully automatic, as the user must run the coding agent from the Downloads folder or allow it to process the file. This vulnerability affects anyone using AI coding agents like OpenAI Codex or Anthropic Claude Code who have the tools enabled to edit files or install packages.

Terms in this story

Hackers
A person who explores and manipulates computer systems, either as a criminal intruder or a security researcher. In news headlines, the word hacker usually means an unauthorized intruder, though the security community also uses it for researchers who find and fix flaws.
malware
Software built to steal data, spy on users, lock files, or take control of a computer. News reports use malware as the umbrella term for viruses, ransomware, spyware, and trojans that criminals install on phones, laptops, or servers without permission. Security+ objective 2.4 lists the term
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
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
attack paths
The chain of accounts, permissions, and network links an attacker follows from a foothold to a target. Cloud security tools map every possible attack path so defenders can see if a minor bug on a public test server connects to a production database key.
operating system
The core software on a computer or phone that manages hardware, files, memory, and running apps. Because every application relies on the operating system, a security flaw in the operating system itself affects millions of devices until users install a system update.
prompts
The text instruction or question a user or program sends to an artificial intelligence model. In AI security news, a prompt includes both the visible question typed by a user and the hidden instructions that an attacker might embed in a web page.
sandbox
An isolated test environment where a program can run without touching the rest of the computer. Web browsers run each tab inside a sandbox so a malicious page cannot read your personal files, and analysts detonate suspicious attachments in a sandbox to watch what they do. Security+ objective 4.1 lists the term
Persistence
The tricks an attacker uses to keep access to a computer after a reboot or password change. To maintain persistence on an infected laptop, malware might add itself to the startup folder or create a hidden scheduled task that runs every time the machine turns on.
MCP server
A connector program that gives an AI assistant access to a specific database, file system, or web API. When a developer connects an AI agent to an MCP server, a bug or malicious prompt in that connector can let the agent run unintended shell commands or read private files.
configuration file
A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
session
An active logged-in period of communication between a user or device and a server. Once you log in to a website, the server tracks your session so you can click from page to page without retyping your password on every screen.

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 Cyber Security News website. Cite the article, not this page.

Read the full article on Cyber Security News (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