Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in @lodash-js/lodash-js (npm)

The npm package @lodash-js/lodash-js is a typosquatting attack masquerading as lodash. It contains a Xelis Stratum cryptocurrency miner that auto-instantiates on require/import and mines on visitor CPUs, with pool and wallet configuration fetched from a hardcoded attacker-controlled Cloudflare Workers endpoint.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any website or application that installed @lodash-js/lodash-js believing it to be the legitimate lodash library would have shipped a browser-based cryptocurrency miner to all end users.
Ecosystems
Attack vectors
Affected entities
  • @lodash-js/lodash-jsnpm package mimicking lodash; contains Xelis Stratum cryptocurrency miner

The package @lodash-js/lodash-js was published to npm under a name designed to mimic the legitimate lodash library. However, its main entry point (dist/xelis-miner.browser.js) is a Xelis Stratum cryptocurrency miner bundle containing an embedded ~35 KB WebAssembly xelis-hash v3 engine.

Upon require/import or via CDN embed (as advertised in the README), the bundle automatically instantiates a XelisMiner web worker that mines cryptocurrency on the visitor's CPU. The miner's pool and wallet configuration are not hardcoded; instead, they are fetched at runtime from a hardcoded attacker-controlled Cloudflare Workers endpoint at https://analytics.baskirill-an.workers.dev/configs/boostydownloader, allowing the operator to rotate mining destinations at will. The bundle also contacts https://api.ipify.org?format=json to capture the visitor's public IP address.

The package metadata (description "lodash-js", keywords including xelis/stratum/miner/wasm) contradicts the lodash-shaped package name, revealing that the sole functionality is the miner, not any lodash API. Any site or application that installed this package under the assumption it was lodash would have shipped a browser-based cryptojacker to all end users, redirecting their compute and electricity to the attacker's mining pool via the mutable command-and-control endpoint.

The incident was identified and credited to the OpenSSF malicious-packages project.

Indicators of compromise

Packages
  • @lodash-js/lodash-js
Domains
  • analytics.baskirill-an.workers.dev
  • api.ipify.org

Remediation

  • Immediately remove @lodash-js/lodash-js from all package.json files and dependency trees
  • Audit all npm packages for similar typosquatting attacks mimicking popular libraries (e.g., lodash, react, express)
  • Replace with the legitimate lodash package (npm: lodash)
  • Review application logs and user-facing systems for evidence of unauthorized CPU usage or mining activity during the package's installation period
  • Implement package name verification and allowlisting in dependency management to prevent installation of lookalike packages
  • Monitor for similar Xelis miner variants or other cryptocurrency mining packages in your supply chain

Sources

  1. GitHub Advisory GHSA-6gwm-c74j-jfv9 · GitHub Advisory Database

Cite this entry

"Malicious code in @lodash-js/lodash-js (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 14, 2026; last updated August 14, 2026. https://supplychainattack.org/incident/malicious-code-in-lodash-js-lodash-js-npm-ikkk1v

Suggest a correction

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

  1. resolvedcritical

    Malicious code in create-coin (npm)

    create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.

    npmCompromised packageTyposquatting
  2. containedcritical

    Malicious code in chai-as-testkit (npm)

    The npm package chai-as-testkit is a typosquat/impersonation attack delivering obfuscated malicious code that executes on import. The package falsely claims to be a vulnerability management tool but ships pino library files under a different author, with a synthetic stub that loads a 4MB+ obfuscated bundle containing attacker-controlled code.

    npmTyposquattingCompromised package
  3. resolvedcritical

    Malicious code in @next-fonts/font (npm)

    @next-fonts/font is a typosquat package on npm that executes arbitrary attacker-controlled code via a blockchain-mediated C2 channel when its Inter() function is called. The malicious payload is base64-encoded and executed through Node.js spawn or eval, with no legitimate font functionality.

    npmTyposquattingCompromised package
  4. resolvedcritical

    Malicious code in chai-as-soul (npm)

    chai-as-soul@2.3.5 is a typosquat of the pino logging library containing malicious code that exfiltrates environment variables (including AWS/GCP/CI tokens) and executes arbitrary remote code on installation.

    npmTyposquattingCompromised package