Malicious File in Downloads Folder Tries to Trick AI Agent

Forever Security says a malicious instruction file in a developer's Downloads folder tried to make an AI coding agent install a known-malicious npm package. The agent was stopped before any code ran.

By Buy Exam Voucher Team · · 5 min read

Short answer: A malicious instruction file in a developer's Downloads folder tried to get an AI coding agent to install a known-malicious npm package. Forever Security caught it on a real customer's machine and stopped the agent before any code ran. No patch applies, so the practical fix is to limit what your agent can read and require approval before it installs anything.

What happened

A malicious instruction file in a developer's Downloads folder tried to make an AI coding agent install a known-malicious npm package. The attempt failed. Security firm Forever Security stopped the agent before any code ran.

The company caught it on a real customer's machine. It could not determine how the file got into the folder.

We only had The Hacker News coverage when we wrote this. We did not have a link to the Forever Security report itself. Read the coverage here: The Hacker News. Its URL places it in October 2026. Check that article for the exact publication date and a link to the original report.

Who is affected

One real customer was targeted, and the attempt was blocked. The source gives no numbers on how many other people received a similar file.

It also does not say how the agent came to read the Downloads folder. We will not guess. What we can say is that any developer who runs an AI coding agent should know what files that agent can reach.

What we know and what we don't

Here is what the source tells us:

  • The file was an instruction file meant to steer an AI coding agent.

  • The goal was to get the agent to install a known-malicious npm package.

  • Forever Security found it on a real customer's machine.

  • The agent was stopped before any code ran.

  • The origin of the file is unknown.

Here is what we cannot tell you from the material we have:

  • The exact file name or contents.

  • The name of the npm package.

  • Which agent or tool was involved.

  • Why the agent was reading that folder.

  • Whether other machines saw the same file.

Check the full report for those details. Do not rely on our summary for indicators of compromise.

Is it being exploited?

The source describes one attempt on one machine. A file reached a real developer's computer and tried to push an agent toward a bad package. It was blocked.

That is not evidence of a wider campaign. It does not rule one out either. The file's origin is unknown, so nobody can say who sent it or how many others exist.

How serious is it?

In this case, the damage was zero. No code ran.

The technique still deserves attention. It does not need a software bug. It relies on an agent treating text in a file as an instruction. This is often called prompt injection.

npm packages can run scripts during install. So a bad package, once installed, can run code on a developer's machine. That is why the install step matters.

The source mentions no CVE and no patch. You cannot fix this by updating one product. You reduce the risk with settings and habits.

How agents load files (general background)

This section is general guidance, not from the report. Details differ by tool, so check your tool's documentation.

Many AI coding agents read text files to get context. Some load instruction or rules files automatically from the project folder or a settings folder. Others read whatever file you point them at, or whatever they decide to open while working.

That is useful, but it creates a risk. If the agent reads a file an attacker wrote, the text inside may look like a command. The agent may not tell the difference between your request and the file's contents.

So the question to ask is simple. Which files can my agent read, and which ones does it load without asking me?

What to do now

These steps are our general suggestions, not instructions from the report. Adjust them to your tools and your company's policy.

  1. Read the full report. Look for file names, package names and other indicators. Search your machines and package manifests for them.

  2. Check unfamiliar files, but do not delete them yet. If you find an odd instruction or config file in Downloads or a project folder, move it somewhere isolated. Report it to your security team first. Delete it only after they say it is fine.

  3. Scope your agent's file access. Check your tool's settings. Point it at the project folder only. Keep it away from Downloads, your home folder and other sensitive paths.

  4. Find out what loads automatically. Look up which instruction or context files your agent reads on its own. Review those locations for files you did not put there.

  5. Review auto-approve settings. Turn on prompts for package installs and shell commands. Read the package name before you approve.

  6. Check new packages. Confirm the name, the publisher and the download history. Watch for names that look like popular packages with small spelling changes.

  7. Review your agent logs. Look for installs or commands you did not ask for.

  8. Act fast if something ran. If you think a bad package was installed, disconnect the machine and tell your security team. Rotate any tokens, keys and passwords that were on it.

If you manage a team, share these steps. Ask developers to report odd files before they remove anything. A reported file may help trace where it came from.

What IT and security learners can take from this

This case shows three ideas that appear in real jobs and in security exams.

Untrusted input. An AI agent reads text and may act on it. Any file it can read is an input you must treat with care, even if it looks harmless.

Least privilege. Give a tool only the access it needs. An agent limited to one project folder has fewer ways to go wrong.

Supply chain risk. Installing a package means trusting its author. Attackers know that and try to slip in bad ones.

You do not need a certification to apply these ideas. Tighten your agent's access this week. If you want to study the topics more deeply, our Cybersecurity certification category covers core security exams. The DevOps & Development category fits package and build safety. For how AI tools work, see the AI & Machine Learning category.

Bottom line

A planted file tried to turn an AI coding agent into a malware installer. A security firm stopped it before any code ran. The source does not say where the file came from. Limit what your agent can read, review its auto-approve settings and read the full report.

Sources

Questions about this topic

What did the malicious file try to do?

It tried to make an AI coding agent install a known-malicious npm package. Forever Security found it in a developer's Downloads folder on a real customer's machine. The agent was stopped before any code ran.

Was anyone's computer infected?

According to the coverage, no. Forever Security stopped the agent before any code ran. We have no information about other machines.

How did the file get into the Downloads folder?

Nobody knows yet. Forever Security said it could not determine how the file arrived. The coverage we reviewed does not say which path was used.

Is there a patch or CVE for this?

The source mentions neither. It is not described as a bug in one product. Your protection comes from limiting what your agent can read and requiring approval before it installs packages.

How can I stop my AI coding agent from installing bad packages?

Restrict the agent's file access to your project folder, and check which files it loads on its own. Turn on approval prompts for installs and shell commands. Read each package name before you approve it, and review your agent logs for actions you did not request.

Where can I read the original report?

We only reviewed The Hacker News coverage, linked in the sources. We did not have a direct link to the Forever Security report. Check that article or Forever Security's website for the full report, including file names and package names.

Exam vouchers related to this article

CompTIAAvailable

CS0-003

CS0-003 CompTIA CySA+ certification badge

CompTIA CySA+

Professional · Security

$224.99

$439.00
list price

Email · within 12 h

Valid 12 months

Details →
CompTIAAvailable

PT0-003

PT0-003 CompTIA PenTest+ certification badge

CompTIA PenTest+

Professional · Penetration Testing

$224.99

$439.00
list price

Email · within 12 h

Valid 12 months

Details →
CompTIAAvailable

CAS-005

CAS-005 CompTIA SecurityX certification badge

CompTIA SecurityX

Expert · Security

$224.99

$544.00
list price

Email · within 12 h

Valid 12 months

Details →

Updated November 5, 2026 · reviewed November 5, 2026.