Executive Summary

In October 2026, researchers at Forever Security discovered a novel AI agent hijacking technique exploiting markdown instruction files such as AGENTS.md and CLAUDE.md placed in a user's ~/Downloads folder. Attackers can silently drop a malicious instruction file via a web page download—without user interaction—targeting popular browsers like Chrome, Edge, and Firefox. When a developer launches an AI coding agent such as OpenAI Codex, Claude Code, or Cursor CLI from that directory, the agent automatically ingests and executes the malicious instructions. Demonstrated impacts include installation of rogue npm packages, OAuth token theft, and remote code execution, with success rates of up to 90% in controlled tests.

This attack class represents a fundamentally new supply-chain risk for AI-augmented development pipelines. As agentic AI tools become standard in developer workflows, the attack surface expands well beyond traditional code and dependency vulnerabilities—any trusted file the agent reads becomes a potential attack vector, demanding new policies around working directory hygiene and egress control.

Why This Matters Now

AI coding agents are now embedded in enterprise developer workflows at scale—Forever Security's own telemetry shows over 1,300 Claude Code sessions launched from ~/Downloads alone. With no patch available from OpenAI or Anthropic (agents behave as designed), organizations face an immediate, unmitigated risk of credential theft and supply-chain compromise through a vector most security teams have not yet inventoried or controlled.

Attack Path Analysis

MITRE ATT&CK® Techniques

Potential Compliance Exposure

Sector Implications

Sources

Frequently Asked Questions

No patch is available because the agents are behaving exactly as designed—they read and execute instructions from files in their working directory. Mitigation relies entirely on user hygiene: developers should never run AI coding agents from their ~/Downloads folder and should always scope the working directory to a specific project.

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 directly relevant to this AI agent hijacking incident because the attacker's success depended on unrestricted outbound API redirection, uncontrolled agent identity permissions, and uninspected east-west access to downstream cloud services. By enforcing segmented workload boundaries, identity-aware egress policies, and controlled outbound paths, CNSF would likely reduce the attacker's reachability and constrain the blast radius before credential exfiltration could complete.

Initial Compromise

Control: Cloud Native Security Fabric (CNSF)

Mitigation: CNSF agentic AI risk detection could flag anomalous agent instruction sources and prompt injection patterns, likely reducing the window in which a maliciously crafted context file goes undetected and acts within a trusted workload boundary.

Privilege Escalation

Control: Zero Trust Segmentation

Mitigation: Zero Trust identity-based policy enforcement would likely constrain the agent's outbound API connections to only pre-authorized endpoints, reducing the opportunity for OAuth token exposure to an unauthorized destination.

Lateral Movement

Control: East-West Traffic Security

Mitigation: East-west workload segmentation would likely reduce the lateral reach of a compromised agent identity, constraining which internal services and cloud APIs the hijacked credential could access from its initial foothold.

Command & Control

Control: Multicloud Visibility & Control

Mitigation: Multicloud Visibility and Control could surface anomalous outbound API patterns and repeated redirected or malformed requests associated with the C2 channel, likely reducing attacker dwell time by enabling faster detection and response.

Exfiltration

Control: Egress Security & Policy Enforcement

Mitigation: Egress Security with FQDN-based policy enforcement would likely block outbound traffic to the attacker's unauthorized server, constraining the token's ability to reach an external destination and reducing the exfiltration path's viability.

Impact (Mitigations)

Remaining impact would likely be constrained to assets within the agent's pre-authorized permission boundary, reducing full account hijacking to a more limited scope of accessible repositories and cloud API surfaces rather than unrestricted lateral reach.

Impact at a Glance

Affected Business Functions

  • AI-Assisted Software Development Pipelines
  • Developer Credential and OAuth Token Management
  • Software Supply Chain Integrity (npm package ecosystem)
  • CI/CD Automation and Code Execution Environments
Operational Disruption

Estimated downtime: 1 days

Financial Impact

Estimated loss: N/A

Data Exposure

OAuth tokens for AI coding agent accounts (Claude Code, OpenAI Codex) were exposed and subject to theft, enabling account impersonation. Developer workstation credentials and session tokens were at risk. Malicious npm package installation could introduce backdoored dependencies into software projects, potentially compromising downstream software supply chain artifacts. Internal source code and project files accessible within the agent working directory were also exposed to exfiltration via redirected API traffic. The attack demonstrated a 90% success rate for arbitrary code execution via Codex and approximately 50% for OAuth token theft via Claude Code in controlled testing.

Recommended Actions

  • • Apply CNSF Cloud Native Security Fabric inline enforcement to detect and block AI agent instruction sources that originate outside trusted project directories, treating agentic AI prompt injection as a first-class threat requiring real-time policy enforcement.
  • • Enforce Egress Security & Policy Enforcement with FQDN and destination allowlisting to prevent AI coding agents from making outbound API connections to any server outside sanctioned model provider endpoints, blocking OAuth token exfiltration via API redirection.
  • • Deploy Multicloud Visibility & Control to baseline normal AI agent API call patterns and alert on anomalous interactions such as unexpected API destination changes, repeated malformed responses, or unauthorized tool call sequences indicative of C2 activity.
  • • Implement Zero Trust Segmentation with identity-based policy scoping the AI agent's service identity to least-privilege access, ensuring a compromised agent OAuth token cannot pivot laterally to additional cloud workloads, internal APIs, or code repositories beyond its minimum required scope.
  • • Use Cloud Firewall (ACF) with URL filtering to block outbound connections to unrecognized npm registries and unauthorized package sources, combined with Inline IPS (Suricata) signatures for known malicious package names to prevent rogue npm package installation as a supply-chain implant vector.

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