Malicious code in whs4_ued (npm)
The npm package whs4_ued contained malicious code in its postinstall hook that exfiltrated system information (OS username, home directory layout, Node.js version, platform, architecture) to an attacker-controlled Discord webhook without user consent.
- Disclosed
- Last updated
- Blast radius
- All users who installed whs4_ued via npm
- Ecosystems
- Attack vectors
- Affected entities
- whs4_uednpm package
The npm package whs4_ued was published with malicious code embedded in its postinstall hook. When installed, the package executed node index.js, which sent sensitive host information to a hardcoded Discord webhook endpoint (discord.com/api/webhooks/1530599209269465319/) controlled by the attacker.
The exfiltrated data included the absolute path of the package file (leaking the OS username and home directory layout), Node.js version, platform, and architecture. The webhook token was obfuscated via string concatenation at the call site to evade naive string matching detection.
The package was presented as an educational typo-catcher tool, but the malicious behavior was unrelated to any stated purpose and included no consent mechanism. The incident was identified and credited to the OpenSSF's malicious-packages repository.
Indicators of compromise
- Packages
- whs4_ued
- Domains
- discord.com
Remediation
- Remove whs4_ued from all npm installations immediately
- Audit npm package.json files and lock files for any dependency on whs4_ued
- Review system logs for any suspicious outbound connections to Discord webhooks during the installation window
- Change any credentials or sensitive information that may have been exposed via the leaked file paths
- Monitor for similar postinstall hook exploits in other dependencies
Sources
- GitHub Advisory GHSA-v5xx-cpfg-4c3j · GitHub Advisory Database
Cite this entry
"Malicious code in whs4_ued (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 11, 2026; last updated August 11, 2026. https://supplychainattack.org/incident/malicious-code-in-whs4-ued-npm-0vxvcu
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - 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 - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package