Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in neverthrow-core (npm)

neverthrow-core@1.1.2 is a typosquat of the legitimate neverthrow library containing malicious code that executes arbitrary binaries from an unverified Dropbox URL during npm install via a preinstall script.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All npm users who installed neverthrow-core@1.1.2
Ecosystems
Attack vectors
Affected entities
  • neverthrow-core · 1.1.2

neverthrow-core@1.1.2 on npm is a typosquatting attack targeting the popular neverthrow library. The malicious package includes a preinstall script in package.json that automatically executes during installation, invoking a bcryptInstall() function from the CommonJS bundle.

The bcryptInstall function fetches a tar.gz archive from an anonymous, mutable Dropbox URL (https://www.dropbox.com/scl/fi/${sha}/bcrypt-all-platforms.tar.gz), streams it to disk, extracts it, changes file permissions, and executes the contents using spawnSync and createRequire. No signature verification or hash pinning is performed on the downloaded payload.

The malicious code is deliberately hidden in the CommonJS build only; the ESM entrypoint (dist/index.es.js) does not contain the bcryptInstall function, potentially evading detection by users who inspect the ESM source. Package metadata (repository, homepage, author) is copied from the legitimate supermacro/neverthrow project to impersonate an official companion package.

The attack was identified by Amazon Inspector and credited to the OpenSSF malicious-packages project.

Indicators of compromise

Packages
  • neverthrow-core@1.1.2
Domains
  • dropbox.com

Remediation

  • Immediately uninstall neverthrow-core from all systems
  • Audit npm install logs for neverthrow-core@1.1.2 installation
  • Review system logs for unexpected process execution during the installation window
  • Verify integrity of systems that installed the package; assume potential compromise
  • Use the legitimate neverthrow package instead (published by supermacro)
  • Add neverthrow-core to npm blocklists and internal security policies
  • Monitor for similar typosquatting attempts on popular packages

Sources

  1. GitHub Advisory GHSA-8xc3-3qhm-xccg · GitHub Advisory Database

Cite this entry

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

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