Skip to content
IAM Insights

Research · Finding · published · Boston Identity

BI-FIND-2025-0808

In the code Snyk prints, the Nx script itself reads the files the agents listed and uploads them to a public GitHub repository with the victim's token.

In the code Snyk reproduces, the Nx script itself does the reading and the upload. A function opens /tmp/inventory.txt and, for each listed path that is a regular file, reads it and base64-encodes the contents, skipping any path it cannot stat or read. Snyk says the script also takes npm and GitHub credentials, using `gh auth token` when it is available, and its result object carries the process environment and a field for the CLIs' output. When it holds a GitHub token, it creates a public repository named s1ngularity-repository in the victim's account and uploads the collected data as results.b64, base64-encoded three times. Snyk adds that the malware appended `sudo shutdown -h 0` to ~/.bashrc and ~/.zshrc, so new shells shut down at once, and that it harvested from developer workstations and "potentially any other CI or build runners where the package was installed." The excerpt exits on Windows (`win32`), though Snyk's text calls these checks cross-platform. Snyk's opening says the payload used the agents "to inventory sensitive files and then exfiltrate secrets"; in the excerpt it prints, we read the agents' part as the inventory alone.

high confidencebest source: vendor, technicalobserved Aug 2025 – Nov 2026

SourceWeaponizing AI Coding Agents for Malware in the Nx Malicious Package Security Incident · Snyk · · read

About Snyk, GitHub, npm, Non-human identity and AI trust.

From the briefing

Nx malware ran AI coding CLIs with guardrail-bypass flags to list sensitive file paths

The malware in the Nx npm releases of August 2025 ran Claude Code, Gemini CLI and Amazon's q, where it found them, with flags that bypass their guardrails, and asked each for the paths of key, wallet and .env files. Its own code then read those files and, with the victim's GitHub token, uploaded them to a public repository. Liran Tal's write-up for Snyk reproduces the code and two prompts, and gives two root causes and two exposure times it does not reconcile.

Article · Snyk · Liran Tal · Aug 27, 2025 · source

Read it in context

Evidence

The passages this finding cites, on the briefing page.

  1. [2]Malware drives local AI coding CLIs with permission-bypass flags
  2. [3]Attack mechanics, impact, timeline and remediation

How to cite

Boston Identity. "Nx malware ran AI coding CLIs with guardrail-bypass flags to list sensitive file paths," BI-FIND-2025-0808. IAM Insights, November 21, 2026. https://insights.bostonidentity.com/ref/BI-FIND-2025-0808

© 2026 Boston Identity LLC. All rights reserved. Quote up to 100 words with the credit Boston Identity, IAM Insights and a link. How to cite · Terms

Was this claim useful?