Nx npm malware allegedly weaponized AI agents to exfiltrate data

Two or more independent security outlets describe an alleged Nx npm package attack that used AI code assistants to inventory and exfiltrate developer files. The reports rely on security researchers and vendor blogs, not official adjudications, and describe post-install behaviors and unsafe flags as part of the mechanism.

Nx · Incident Aug 27, 2025 · Indexed Jun 5, 2026 · 3 sources

AI code assistants were weaponized to inventory and exfiltrate developer files.
What
Two or more independent security outlets describe an alleged Nx npm package attack that used AI code assistants to inventory and exfiltrate developer files.
Incident date
Aug 27, 2025
Who
Nx
Failure mode
Data Leakage
AI surface
Code Assistant
Severity
High

What happened

Security outlets report that Nx npm packages allegedly invoked AI code assistants (Claude Code, Gemini CLI, and Amazon Q) via post-install actions to inventory and exfiltrate sensitive developer files. Reports mention the use of unsafe flags such as --dangerously-skip-permissions to bypass user confirmations, enabling autonomous data collection and transfer.

What broke inside the model

Failure path · mode profile · Data Leakage
  1. 01 · TriggerA request triggers retrieval or context loading.
  2. 02 · Model stepThe context pulls in another user's content.
  3. 03 · Control gapNo boundary enforces isolation at the moment of output.
  4. 04 · FailurePrivate data crosses into the response.
  5. 05 · ConsequenceOne user sees another's data, and disclosure follows.

One user's content crosses the retrieval boundary into another's response.

The mechanism centers on malicious Nx packages triggering AI code assistants to perform file discovery and exfiltration, with flags like --dangerously-skip-permissions used to bypass prompts and enable automated operations.

Public visibilityHigh
Regulatory exposurePossible
Customer impactFew customers
Financial impactUnknown
Time to disclosureMonths
  1. PressWeaponizing AI coding agents for malware in the Nx malicious packagesnyk.io
  2. PressNX Build Platform Compromised by Supply Chain Attack , How Attackers Collude with AI Code Assistantsendorlabs.com
  3. PressClaude Code dangerously skip permissionstruefoundry.com
Permalinkhttps://failureindex.ai/failures/npm-malware-allegedly-weaponized-agents-exfiltrate
CitationAI Failure Index. "Nx npm malware allegedly weaponized AI agents to exfiltrate data" (FI-0240). Realm Labs. https://failureindex.ai/failures/npm-malware-allegedly-weaponized-agents-exfiltrate (indexed Jun 5, 2026).
Share cardA branded image of this record for posts and slides.

Data fields CC-BY 4.0, prose citation permitted. Incident ID FI-0240. Full dataset at /data.

Note from Realm Labs, the Index steward

How Realm would have caught this

Controls for this failure mode
  • Prism
  • OmniGuard
  • AI Detection & Response (AIDR)

Realm can detect when a response is about to emit data that falls outside the bounds of the current user and context, and block or redact it inline, at the moment of generation rather than after the data has left.