Executive Summary

In October 2026, security firm Forever Security uncovered a novel prompt-injection attack targeting AI coding agents such as OpenAI Codex and Anthropic Claude Code. A malicious AGENTS.md instruction file was discovered in a developer's Downloads folder, directing the AI agent to install the MALFEX-campaign npm package "function-color," which chains to a downloader and executes a Windows payload. Browsers can silently deposit files into Downloads without user interaction, meaning a single malicious webpage visit can plant attacker-controlled instructions that any subsequently launched coding agent will obey autonomously—achieving code execution or account takeover with no patch available from the AI vendors.

This incident signals a rapidly maturing class of supply-chain threat that weaponizes the trust model of agentic AI tools. As developer adoption of autonomous coding agents accelerates, adversaries are actively mapping their implicit trust boundaries—instruction files, config stores, and API endpoints—turning the agent's own obedience into the attack surface.

Why This Matters Now

Agentic AI coding tools are now deployed across tens of thousands of developer workstations, many integrated into CI/CD pipelines with broad filesystem and network permissions. The MALFEX campaign demonstrates that attackers have already operationalized prompt-injection via browser-dropped instruction files. With no vendor patch possible and half of surveyed environments running agents in writable folders, the window for enterprise exposure is open today.

Attack Path Analysis

MITRE ATT&CK® Techniques

Potential Compliance Exposure

Sector Implications

Sources

Frequently Asked Questions

The attack exposes gaps in agentic AI governance, egress traffic control, and supply-chain risk management—areas addressed by NIST CSF ID.RA-3, NIST 800-53 SI-4, and emerging ZTMM automation controls. Organizations lack policies governing which directories AI agents may operate in and what external packages they may install without human approval.

Cloud Native Security Fabric Mitigations and ControlsCNSF

Based on the attack progression modeled above, these are the defensive controls that would constrain each stage.

Aviatrix Zero Trust CNSF is relevant here because the attack depended entirely on an AI coding agent making unrestricted outbound connections to attacker-controlled npm registries and API endpoints. By enforcing segmented workload boundaries and controlled egress paths, CNSF would likely reduce the attacker's ability to reach external infrastructure and propagate influence across developer environments.

Initial Compromise

Control: Cloud Native Security Fabric (CNSF)

Mitigation: CNSF fabric-level segmentation would likely reduce the reachability of developer workstations from untrusted web origins, constraining the surface area through which attacker-controlled content could be delivered and acted upon by workload-level agents.

Privilege Escalation

Control: Zero Trust Segmentation

Mitigation: Zero Trust segmentation would likely constrain the privilege scope available to agent processes, reducing their ability to write to global configuration paths or escalate influence beyond the immediate working context of a single session.

Lateral Movement

Control: East-West Traffic Security

Mitigation: East-west traffic enforcement would likely reduce the attacker's ability to propagate influence laterally across projects and environments by constraining which internal paths and services a compromised agent session is permitted to reach.

Command & Control

Control: Multicloud Visibility & Control

Mitigation: Multicloud visibility and traffic control would likely expose anomalous outbound connections to unrecognized npm registries and spoofed AI API endpoints, reducing the attacker's ability to maintain a low-profile C2 channel disguised as routine developer tooling traffic.

Exfiltration

Control: Egress Security & Policy Enforcement

Mitigation: Egress policy enforcement would likely reduce the outbound paths available for credential and token exfiltration by constraining agent-initiated HTTPS connections to approved AI API destinations only, making rogue endpoint redirects far less likely to succeed undetected.

Impact (Mitigations)

With earlier CNSF controls reducing attacker reachability across egress, east-west paths, and configuration scope, the residual impact would likely be narrowed — constraining payload delivery and token theft to scenarios where enforcement gaps exist, rather than enabling full workstation compromise and account takeover.

Impact at a Glance

Affected Business Functions

  • AI-Assisted Software Development Pipelines
  • Developer Workstation Security and Endpoint Integrity
  • API Credential and Authentication Token Management
  • Supply Chain and Dependency Management (npm)
Operational Disruption

Estimated downtime: 1 days

Financial Impact

Estimated loss: N/A

Data Exposure

Developer API session tokens (e.g., Anthropic API keys) are at risk of exfiltration through manipulated ANTHROPIC_BASE_URL redirection, enabling account takeover of AI coding assistant accounts. Sensitive source code, proprietary project files, and environment variables present in the developer workstation context may be exposed to attacker-controlled MCP or API proxy servers. In organizations where coding agents have broad filesystem or network access, the blast radius extends to internal credentials, configuration secrets, and intellectual property within any project folder the agent subsequently opens. The MALFEX-linked npm packages (function-color, function-flag) deliver a Windows payload capable of arbitrary code execution, potentially enabling lateral movement, credential harvesting, or ransomware staging on the affected developer machine.

Recommended Actions

  • • Enforce egress security and FQDN-based policy controls (CNSF Egress Security & Policy Enforcement) to block outbound connections to unauthorized npm registries, unknown package repositories, and unrecognized API endpoints — this would have prevented function-color/function-flag C2 establishment and the rogue ANTHROPIC_BASE_URL exfiltration channel.
  • • Deploy Cloud Native Security Fabric (CNSF) inline enforcement with AI-aware traffic inspection to detect anomalous agent behavior such as repeated malformed API requests, redirection of model API traffic to non-canonical endpoints, and suspicious automation patterns consistent with prompt injection attacks.
  • • Apply Zero Trust Segmentation and least-privilege identity-based policy to developer workstations and CI/CD environments, ensuring AI coding agents operate within tightly scoped trust boundaries that prevent global config file writes (e.g., ~/.codex/config.toml) from being executed without explicit policy approval.
  • • Leverage Multicloud Visibility & Control with centralized policy observability to baseline normal AI agent traffic patterns, enabling detection of anomalous interactions such as connections to newly registered npm packages, unexpected config mutations, or API traffic redirected to non-standard endpoints.
  • • Implement Cloud Firewall (ACF) with URL filtering and outbound traffic controls on developer endpoints to block silent browser-initiated file downloads to trusted agent directories and prevent AI agent sessions from installing packages from unvetted or recently published npm sources without explicit approval.

Secure the Paths Between Cloud Workloads

A cloud-native security fabric that enforces Zero Trust across workload communication—reducing attack paths, compliance risk, and operational complexity.

Cta pattren Image