Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in lodash-lib (npm)

lodash-lib@1.0.0 on npm is a typosquatting package containing malicious code that executes a postinstall script to download and execute a Windows binary. The package masquerades as the legitimate lodash library and uses obfuscation techniques to hide its malicious behavior.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any developer or system that installed lodash-lib@1.0.0 from npm
Ecosystems
Attack vectors
Affected entities
  • lodash-lib · 1.0.0

lodash-lib is a typosquatting package on npm designed to impersonate the legitimate lodash library. The package exports an empty object in its main index.js file, with all malicious behavior hidden in scripts/postinstall.js.

Upon installation, the postinstall script XOR-decodes (using key 'stf2026') a URL and PowerShell command from obfuscated integer arrays. It then POSTs the installer's platform label to a hardcoded IP endpoint (http://193.70.34.101:20099/vote), with the IP address itself assembled from a string array to evade static scanning. The script downloads an executable from an unrelated GitHub repository (https://github.com/bebraz1/qPzM50V1AKG0rVlH/releases/download/null/main.exe) to %TEMP%/main.exe and executes it with detached stdio. On Windows Subsystem for Linux (WSL), the script bridges the download-and-execute command to the Windows host via PowerShell.

The attack exhibits multiple indicators of malicious intent: the GitHub repository hosting the binary is unrelated to the package publisher, the download URL is unpinned and unversioned, no cryptographic hash or signature verification is performed, and deceptive naming conventions ('addon', 'telemetry') are used throughout the code. This incident was identified and credited to the OpenSSF's malicious-packages repository.

Indicators of compromise

Packages
  • lodash-lib
Domains
  • github.com/bebraz1/qPzM50V1AKG0rVlH
IPs
  • 193.70.34.101

Remediation

  • Immediately uninstall lodash-lib from all systems
  • Audit npm install logs to identify any systems that installed lodash-lib@1.0.0
  • Scan affected systems for the presence of %TEMP%/main.exe or related artifacts
  • Review network logs for connections to http://193.70.34.101:20099/vote
  • Replace any usage of lodash-lib with the legitimate lodash package
  • Implement npm package name verification and typosquatting detection in your dependency management process
  • Consider using npm audit or similar tools to detect known malicious packages

Sources

  1. GitHub Advisory GHSA-5jhw-cjxx-3rv7 · GitHub Advisory Database

Cite this entry

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

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 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
  2. 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
  3. 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
  4. 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