Skip to content
supplychainattack.orgSupply chain attack incident catalog
resolvedcritical

Malicious code in preinstall-hook-webhook-callback-demo (npm)

The npm package preinstall-hook-webhook-callback-demo contained malicious code in its preinstall lifecycle script that automatically contacts webhook.site, an attacker-controlled exfiltration endpoint, upon installation. This enables data exfiltration and callback beaconing at install time without user interaction.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
All npm users who installed preinstall-hook-webhook-callback-demo
Ecosystems
Attack vectors
Affected entities
  • preinstall-hook-webhook-callback-demonpm package with malicious preinstall script

The npm package preinstall-hook-webhook-callback-demo was found to contain malicious code embedded in its package.json preinstall lifecycle script. The script automatically executes when users run npm install, before any user interaction occurs.

The preinstall hook is configured to contact webhook.site, an ephemeral request-capture service commonly used as an attacker-controlled exfiltration sink. webhook.site is not a legitimate, documented, or first-party destination for any legitimate build or runtime purpose of this package.

The combination of an auto-executing preinstall script wired to an out-of-band capture endpoint represents a classic installer-side data exfiltration and callback beaconing attack pattern. This allows attackers to exfiltrate data or establish command-and-control callbacks at the moment of package installation.

The incident was identified and credited to the OpenSSF malicious-packages project, which maintains a catalog of confirmed malicious packages across package ecosystems.

Indicators of compromise

Packages
  • preinstall-hook-webhook-callback-demo
Domains
  • webhook.site

Remediation

  • Remove preinstall-hook-webhook-callback-demo from all projects and dependencies
  • Audit npm install logs and environment for any suspicious network connections to webhook.site or similar exfiltration endpoints
  • Review any systems where this package was installed for signs of data exfiltration or unauthorized access
  • Use npm audit to identify if this package is present in any project dependencies
  • Consider implementing npm package signature verification and allowlisting to prevent installation of malicious packages

Sources

  1. GitHub Advisory GHSA-9j5p-xwfm-m987 · GitHub Advisory Database

Cite this entry

"Malicious code in preinstall-hook-webhook-callback-demo (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 14, 2026; last updated August 14, 2026. https://supplychainattack.org/incident/malicious-code-in-preinstall-hook-webhook-callback-demo-npm-1vepbj

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 core-tailwindcss-utility (npm)

    core-tailwindcss-utility, an npm package falsely advertised as a Tailwind CSS utility, contains malicious code that fetches and executes arbitrary Node.js code from a remote C2 server. The package includes suspicious dependencies for credential theft and remote communication.

    npmCompromised package
  2. containedcritical

    Malicious code in bcc-design-icons (npm)

    bcc-design-icons@9999.0.0 on npm contains malicious postinstall script that exfiltrates hostname and package name to attacker-controlled IP 91.201.215.48:8000. The package lacks expected icon-library functionality and exhibits characteristics of a dependency-confusion attack targeting internal/private npm installers.

    npmDependency confusionCompromised package
  3. containedcritical

    Malware in blastradar

    Malware was discovered in the npm package blastradar, resulting in full system compromise for any computer with the package installed or running. All secrets and keys on affected systems should be rotated immediately from a different computer.

    npmCompromised package
  4. containedcritical

    Malicious code in runtime-health (npm)

    The npm package runtime-health version 1.0.2 was identified as malicious by the OpenSSF Package Analysis project. The package executes commands associated with malicious behavior.

    npmCompromised package