Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in @wagni_bot/polygon (npm)

The npm package @wagni_bot/polygon is a credential stealer disguised as a Polygon SDK, part of a coordinated 25-package typosquatting campaign published under @wagni_bot on 2026-07-09. Each package executes a postinstall hook that exfiltrates SSH keys, cryptocurrency wallets, .env files, and system fingerprints to a hardcoded Telegram bot.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer who installed @wagni_bot/polygon or any of the 25 coordinated packages in the @wagni_bot scope before removal; credential theft affects all users on affected machines.
Ecosystems
Attack vectors
Affected entities
  • @wagni_bot/polygonTyposquat package masquerading as Polygon SDK; part of 25-package coordinated campaign under @wagni_bot scope

The npm package @wagni_bot/polygon is a supply-chain credential stealer masquerading as a Polygon blockchain SDK. It is one of 25 malicious packages published under the @wagni_bot npm scope on 2026-07-09 in a coordinated typosquatting campaign targeting crypto and web3 developers.

Each package declares a postinstall lifecycle hook that executes automatically during npm install, before the package is ever imported. The hook runs a script that fingerprints the host system (hostname, user info, platform), walks the user's home directory, and exfiltrates sensitive data including SSH private keys (~/.ssh/id_rsa), cryptocurrency wallet files, and .env files containing API keys, tokens, and seed phrases.

The stolen data is JSON-encoded and sent to a hardcoded Telegram bot via the Telegram Bot API endpoint. All error paths are silently swallowed to make the installation appear normal. Research confirmed the campaign is a single automated actor: the payload file is byte-identical across all 25 packages at each version, and all packages exfiltrate to the same Telegram bot token.

The packages were detected and reported on 2026-07-09 while still live on npm. The incident represents a critical threat to any developer who installed these packages, as credentials are stolen before the package is ever used.

Indicators of compromise

Packages
  • @wagni_bot/polygon
Domains
  • api.telegram.org

Remediation

  • Immediately uninstall @wagni_bot/polygon and any other packages from the @wagni_bot scope
  • Rotate all SSH private keys, cryptocurrency wallet credentials, and API tokens/secrets that may have been exposed
  • Review .env files and environment variables for exposure; regenerate any exposed API keys, tokens, and seed phrases
  • Audit npm install logs and package-lock.json for presence of @wagni_bot packages or other suspicious dependencies
  • Implement npm package allowlisting or use npm audit to detect typosquatting attempts
  • Monitor for unauthorized access to cryptocurrency wallets and accounts using exposed credentials

Sources

  1. GitHub Advisory GHSA-5w5j-423r-2x73 · GitHub Advisory Database

Cite this entry

"Malicious code in @wagni_bot/polygon (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 9, 2026; last updated July 28, 2026. https://supplychainattack.org/incident/malicious-code-in-wagni-bot-polygon-npm-ay8akj

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. containedcritical

    Malicious code in @ai_/autoprefixers (npm)

    @ai_/autoprefixers is a typosquat of the legitimate autoprefixer package that executes arbitrary attacker-controlled shell commands on installation. The malicious code fetches encrypted payloads from remote C2 servers and decrypts them using a hardcoded key suffix before execution via child_process.exec.

    npmTyposquattingCompromised package
  2. resolvedcritical

    Malicious code in ethers-secure (npm)

    The npm package ethers-secure, which mimics the popular ethers library, contained malicious code that exfiltrated Ethereum private keys to an attacker-controlled server (enjbyg3xk8l.x.pipedream.net) whenever its wallet API was used. The package was identified by Amazon Inspector and credited to the OpenSSF malicious-packages project.

    npmCompromised packageTyposquatting
  3. containedcritical

    Malicious code in chain-analyze (npm)

    The npm package chain-analyze contained malicious code that executed arbitrary Node.js commands on installation. The package impersonated the official Theta blockchain SDK and used a split-package design with a dependency (chain-manager) to hide encrypted payload from scanners.

    npmCompromised packageTyposquatting
  4. containedcritical

    Malicious code in parallely (npm)

    The npm package parallely contains malicious code that impersonates the legitimate concurrently package. When invoked, it executes a dropper that downloads and runs platform-specific payloads after anti-analysis checks.

    npmCompromised packageTyposquatting