Threat reportSupply ChainTL-2026-4436
Malicious AGENTS.md / CLAUDE.md Files in Downloads Folder Trick AI Coding Agents (Codex, Claude Code) Into Installing MALFEX npm Malware (function-color, function-flag)
Forever Security reports that malicious agent instruction files (AGENTS.md / CLAUDE.md) sitting in a user's Downloads folder can make AI coding agents install known malware, including the MALFEX npm packages function-color and function-flag. Codex ran the malware in more than 90% of attempts and Claude Code in about half; the issue is design behavior, not a patchable vulnerability. First disclosed .
Key facts
| Identifiers | TL-2026-4436 |
|---|---|
| Also known as | MALFEX |
| Severity | MEDIUM |
| First disclosed | |
| Affected products | OpenAI Codex (coding agent); Anthropic Claude Code; npm function-flag; npm function-color |
| Weaknesses (CWE) | CWE-1427, CWE-506, CWE-829, CWE-77, CWE-94 |
| Attribution | MALFEX operator (low confidence) |
| Malware | Overlord RAT, Rakhni, telegram |
| MITRE ATT&CK / ATLAS techniques | AML.T0051.001 Indirect, T1027 Obfuscated Files or Information, T1027.009 Obfuscated Files or Information: Embedded Payloads, T1036 Masquerading, T1053.005 Scheduled Task, T1055.012 Process Injection, T1056.001 Keylogging, T1059.005 Visual Basic, T1059.007 JavaScript, T1102 Web Service, T1105 Ingress Tool Transfer, T1113 Screen Capture and 9 more in the attack flow |
| Motivation | FINANCIAL |
| Target sectors | technology, software-development, cryptocurrency |
| Target regions | Global |
| Detection rules | 9 (1 shown free) |
| Sources | 7 cited sources |
Detection coverage
As of 2026-10-26, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-4436 across Splunk SPL, Microsoft KQL and Sigma, covering 41 indicator(s) of compromise. The whole corpus is readable without an account. Every threat comes with one complete detection in Splunk SPL, Microsoft KQL and Sigma, free for everyone; a free account adds daily TL Creds to unlock the rest. Paid plans add a larger daily allowance, correlation and the MCP server. Threadlinqs MCP server · View plans.
Free detection: Overlord RAT AutoIt Loader Execution (h.a3x / Oxygen.a3x / ScopeSmart Directory)
Detects AutoIt3.exe running the MALFEX Overlord RAT scripts h.a3x or Oxygen.a3x, or any process image executing from the %LOCALAPPDATA%\ScopeSmart Technologies Inc persistence directory. AutoIt is not normally present on developer endpoints, so execution is a strong post-exploitation indicator of the function-flag / mxdriver loader chain.
- Languages: Splunk SPL, Microsoft KQL, Sigma
- ATT&CK: T1059.005, T1027, T1140
- Data sources: sysmon, windows_process_creation, microsoft_defender_endpoint
- Severity: high
- Confidence: high
Splunk SPL
index=windows sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1 earliest=-24h ((Image="*AutoIt3.exe" AND (CommandLine="*h.a3x*" OR CommandLine="*Oxygen.a3x*")) OR Image="*ScopeSmart Technologies*") | stats count min(_time) as first_seen max(_time) as last_seen values(Image) as images values(CommandLine) as command_lines values(ParentImage) as parents by host, User | convert ctime(first_seen) ctime(last_seen) | table host User images command_lines parents count first_seen last_seenMicrosoft KQL
DeviceProcessEvents | where Timestamp > ago(24h) | where (FileName =~ "AutoIt3.exe" and ProcessCommandLine has_any ("h.a3x", "Oxygen.a3x")) or FolderPath has "ScopeSmart Technologies" | project Timestamp, DeviceName, AccountName, FileName, FolderPath, ProcessCommandLine, InitiatingProcessFileName, InitiatingProcessCommandLine, SHA256 | order by Timestamp descSigma
title: Overlord RAT AutoIt Loader Execution (MALFEX)
id: 6f3c1a52-8d47-4b19-9e0a-3b7d52c1a002
status: experimental
description: Detects AutoIt3.exe executing the MALFEX Overlord RAT scripts h.a3x or Oxygen.a3x, or processes running from the ScopeSmart Technologies Inc persistence directory.
references:
- https://www.cloudsek.com/blog/malfex-malicious-npm-postinstall-supply-chain-campaign
- https://checkmarx.com/zero-post/malfex-npm-malware-campaign-three-payloads-and-an-adversary-that-signs-their-work/
author: Threadlinqs Team
date: 2026-10-26
tags:
- attack.execution
- attack.t1059.005
- attack.defense-evasion
- attack.t1027
- attack.t1140
logsource:
category: process_creation
product: windows
detection:
selection_autoit:
Image|endswith: '\AutoIt3.exe'
CommandLine|contains:
- 'h.a3x'
- 'Oxygen.a3x'
selection_dir:
Image|contains: '\ScopeSmart Technologies Inc\'
condition: 1 of selection_*
falsepositives:
- Legitimate administrative AutoIt scripts that happen to be named h.a3x
level: high
Known false positives:
- Legitimate AutoIt automation scripts used by IT or QA teams
- Software deployment tooling that bundles AutoIt3.exe
Tuning notes: Baseline AutoIt3.exe usage and allowlist signed internal scripts by path or hash. The ScopeSmart directory clause has very low false-positive risk and can be alerted on independently.
- Agent Instruction File Dropped in Downloads / Agent Config Tampering ([indicator], [indicator], .codex, .claude) · unlock with TL Creds
- Overlord RAT 'Maiden' Scheduled Task Persistence (AutoIt, Backdated Start) · unlock with TL Creds
- MALFEX Infrastructure and Non-Browser Exfil/C2 Service Connections (Discord, Telegram, Solana, imghippo) · unlock with TL Creds
- Postinstall Payload Execution: malfex.exe, nocry.exe or Node-Spawned svchost/Temp Binary · unlock with TL Creds
- MALFEX Stealer Downloader Artifacts: node_runtime_helper.exe, SmartScope.vbs, h.a3x · unlock with TL Creds
- DNS Lookup of Discord, Telegram, Solana or imghippo by Node/AutoIt Process · unlock with TL Creds
- MALFEX npm Package Install ([indicator] / [indicator]) — Agent-Driven or Manual · unlock with TL Creds
- MALFEX Payload Host and Loader Infrastructure Connections (IP and DNS) · unlock with TL Creds
Indicators of compromise
As of 2026-10-26, Threadlinqs Intelligence tracks 41 indicators of compromise for TL-2026-4436.
Sample indicators (3 of 41)
- IP address:
104.234.65[.]75 - Domain:
cdnzona[.]discloud[.]app - URL:
hxxps://raw[.]githubusercontent[.]com/cavecrew/proj/main/banner.png
Defanged, TLP:CLEAR. Full set of 41 indicators: unlock with TL Creds.
Technical analysis
Forever Security documented a real attacker-authored AGENTS.md found on a customer's machine and reproduced the attack against OpenAI Codex and Anthropic Claude Code. The attack combines two individually harmless features: websites can save files into the Downloads folder without user interaction (the site chooses filename and contents), and coding agents read and follow instruction files in their working directory. A file named AGENTS.md or CLAUDE.md that masquerades as engineering documentation is therefore picked up whenever a user starts an agent in ~/Downloads.
Against Codex, the attacker's AGENTS.md was framed as routine project setup and told the agent to register a server in ~/.codex/config.toml and install an npm package. Per the report, Codex ran the malware in more than 90% of attempts. Because the config change lives in ~/.codex/config.toml, it affects every later Codex session, not only those started in Downloads. Against Claude Code, a planted CLAUDE.md posed as internal gateway setup and tried to write ANTHROPIC_BASE_URL into project settings (.claude/settings.json); this succeeded about half the time because of approval prompts. Redirecting the API endpoint can leak session login tokens, enabling account takeover and command injection from attacker-controlled servers. Forever Security built a proof-of-concept page that silently drops an AGENTS.md, but states it did not establish that this is how the observed file arrived. Forever Security's telemetry says roughly 50% of its customers run coding agents in Downloads and about 25% of agent sessions have a browser open at the same time.
The packages named in the instructions, function-color (wrapper that pulls in function-flag) and function-flag (postinstall downloader that fetches and runs a Windows PE payload), belong to the MALFEX npm campaign named by CloudSEK (2026-09-30) and Checkmarx (2026-10-05). MALFEX is attributed to a single operator active since August 2023 across five npm publisher handles; eight of twelve published packages are malicious, with 40,767 total downloads as of 2026-10-01 (function-flag alone 37,419, malicious since 2025-07-18). The campaign has three Windows payload paths: the Overlord Go RAT, which resolves its C2 address from Solana transaction memos and persists through an AutoIt scheduled task named Maiden; the movinlike Node.js stealer targeting Discord, browsers, Telegram and crypto wallets; and the function-flag downloader chain, whose final payload was not recovered because the server was unresponsive. As of late September 2026 function-flag, function-color and cdn-img-fetch were still installable and function-flag and function-color had no advisory. The sources do not establish who authored the malicious AGENTS.md or whether the file's author is the MALFEX operator; they only show the file points at MALFEX packages.
Vendors' position per the report: there is nothing for OpenAI or Anthropic to patch, since the agents function as designed and the weakness is the trust placed in untrusted instruction content. Severity (MEDIUM) and category (SUPPLY_CHAIN) are analyst judgment, not source-stated.
MITRE ATT&CK / ATLAS techniques by tactic:
Execution
AML.T0051.001 Indirect; T1059.005 Visual Basic; T1059.007 JavaScript; T1204.002 User Execution
Defense Evasion
T1027 Obfuscated Files or Information; T1027.009 Obfuscated Files or Information: Embedded Payloads; T1036 Masquerading; T1055.012 Process Injection; T1134.004 Access Token Manipulation; T1140 Deobfuscate/Decode Files or Information; T1562.001 Impair Defenses
Persistence
Collection
T1056.001 Keylogging; T1113 Screen Capture
Command and Control
T1102 Web Service; T1105 Ingress Tool Transfer
Initial Access
T1195.002 Compromise Software Supply Chain
Credential Access
T1528 Steal Application Access Token; T1555.003 Credentials from Web Browsers; T1557 Adversary-in-the-Middle
Exfiltration
Remediation
Immediate actions
- Do not start Codex, Claude Code or other coding agents in ~/Downloads (the only folder the web can write to unilaterally)
- Inspect any unfamiliar AGENTS.md or CLAUDE.md before running an agent in that directory
- Audit ~/.codex/config.toml and .claude/settings.json for unexpected MCP servers or ANTHROPIC_BASE_URL overrides
- Search developer hosts and lockfiles for function-flag, function-color, cdn-img-fetch, img-to-native, native-runner, tlxbnhd, tldriver and mxdriver
- Rotate agent login tokens and developer credentials on any host where a suspect instruction file or MALFEX package is found
Workarounds
- Run agents only inside trusted, dedicated project directories
- Use ignore-scripts for npm installs initiated by agents
Longer-term hardening
- Keep agent approval prompts and sandboxes enabled and do not auto-approve package installs or config writes
- Monitor writes to agent configuration files and npm install activity spawned by agent processes
- Block or alert on npm postinstall scripts that download executables; use install-script restrictions and a package proxy allowlist
- Alert on AutoIt3.exe execution and scheduled tasks created with backdated start dates
Affected and fixed versions
- OpenAI — Codex (coding agent)
Vulnerable versions: Not specified in source; design behavior - Anthropic — Claude Code
Vulnerable versions: Not specified in source; design behavior - npm — function-flag
Vulnerable versions: 1.7.3; 2.3.5-2.3.9; 3.0.0; 4.0.0 - npm — function-color
Vulnerable versions: 1.0.0; 1.7.3
Timeline
Last updated · 2 updates · revalidated 2× · latest source
- MALFEX operator begins publishing malicious npm packages (August 2023; exact day not stated in sources)
- function-flag begins carrying a malicious postinstall downloader and stays undetected for about fourteen months
- Latest function-flag release is dated 2025-08-04 per The Hacker News; the package accounts for 37,419 of the campaign's 40,767 downloads.
- OSV malware advisories start appearing for removed MALFEX packages (22-30 September 2026); function-flag and function-color get no advisory
- Checkmarx records new stealer downloader samples for the cdn-img-fetch chain on 25 and 26 September
- Checkmarx reports function-flag, function-color and cdn-img-fetch still live and installable on npm; function-flag and function-color have no OSV malware advisory.
- CloudSEK publishes its MALFEX analysis covering function-flag, function-color, the Overlord loaders and the stealer chain
- Campaign totals 40,767 downloads across eight malicious packages; function-flag accounts for 37,419
- Checkmarx publishes its technical analysis of three payloads and the operator's MALFEX branding
- OSV MAL-2026-17320 for cdn-img-fetch is updated; it covers only v1.0.0 and v1.0.1, leaving v1.0.2 and v1.0.3 uncovered
- Forever Security publishes its primary research (Gal Weizman, Omer Samet) after its product stopped an agent on a customer machine from installing function-color.
- BastionZero publishes analysis of the rogue locked-ioc-27 Downloads-folder technique and lists Cursor CLI as an affected agent.
- The Hacker News reports Forever Security's finding that malicious locked-ioc-27/locked-ioc-28 files in Downloads steer Codex (more than 90% of attempts) and Claude Code (about half) into installing function-color/function-flag
Update history
- 2026-10-26 — In-the-Wild Malicious locked-ioc-27 / locked-ioc-28 Indirect Prompt Injection Against Codex and Claude Code Delivers MALFEX npm Package (function-color): What changed No field escalation. Existing record already ACTIVE/HIGH impact; the newer report's HIGH severity is analyst judgment, not source-stated, so MEDIUM is left as is.
- 2026-10-26 — Malicious locked-ioc-27 / locked-ioc-28 Files in Downloads Folder Hijack OpenAI Codex and Anthropic Claude Code (function-color / MALFEX npm Payload): What changed No field escalations.
Sources cited
- OSV advisory MAL-2026-17320 (cdn-img-fetch) osv.dev · Advisory · 2026-10-08
- CloudSEK: MALFEX malicious npm postinstall supply chain campaign cloudsek.com · Research · 2026-09-30
- Checkmarx: MALFEX npm Malware Campaign - Three Payloads And An Adversary That Signs Their Work checkmarx.com · Research · 2026-10-05
- MALFEX npm Campaign: 8 Packages Trigger Malware on Install and Require lilting.ch · Blog
- Malicious File in Downloads Folder Tries to Trick AI Coding Agent Into Installing Malware The Hacker News · News · 2026-10-26
- The Hacker News: Eight malicious npm packages downloaded The Hacker News · News
- Hackread: MALFEX npm Attack Spreads Windows RAT, Steals Discord and Browser Data hackread.com · News
More from MALFEX operator
Previous and next in supply chain
Further reading
Drafted by the Threadlinqs research pipeline from 7 sources; published ; last updated .