Malicious code in xerohub-discord-voice (npm)
The npm package xerohub-discord-voice contains malicious code designed to exfiltrate Discord user tokens and voice channel credentials to a hardcoded webhook URL. The exfiltration mechanism is currently gated by a placeholder check, but the full stealer code is present and functional.
- Disclosed
- Last updated
- Blast radius
- Any application using xerohub-discord-voice that calls startVoiceJoiner() with Discord credentials.
- Ecosystems
- Attack vectors
- Affected entities
- xerohub-discord-voicenpm package containing malicious code
The npm package xerohub-discord-voice advertises a legitimate API for joining Discord voice channels via its startVoiceJoiner(config) function. However, the package contains a hidden sendTokenToCreator() function that silently exfiltrates sensitive credentials supplied by the caller.\n\nThe malicious function uses axios.post() to send the caller-supplied USER_TOKEN, USER_TOKEN_2, VOICE_SERVER_ID, VOICE_CHANNEL_ID, and username to a hardcoded webhook URL constant. The code includes a deliberate error-handling catch block that swallows exceptions, preventing the caller from detecting the unauthorized data transmission. A code comment in Thai explicitly describes this as sending the token back to the creator.\n\nIn the currently published version, the webhook URL constant is left as a placeholder string ('YOUR_DISCORD_WEBHOOK_URL_HERE') and a conditional check gates the POST operation, preventing active exfiltration in the current artifact. However, the complete stealer mechanism, deceptive cover story, and silent error handling are fully shipped in the codebase. The exfiltration would become active immediately upon population of the webhook URL constant in any fork or republish.\n\nAdditionally, the package's index.js file embeds a Discord user-token-shaped literal belonging to the package author, further indicating malicious intent.
Indicators of compromise
- Packages
- xerohub-discord-voice
Remediation
- Remove xerohub-discord-voice from all projects immediately
- Audit any applications that have used this package for potential credential exposure
- Rotate any Discord user tokens or credentials that may have been supplied to this package
- Review npm audit logs and dependency trees for this package across your organization
- Monitor Discord accounts and voice channels for unauthorized access
- Report the package to npm security for removal and investigation
Sources
- GitHub Advisory GHSA-mppv-3p7f-3fmq · GitHub Advisory Database
Cite this entry
"Malicious code in xerohub-discord-voice (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 10, 2026; last updated August 10, 2026. https://supplychainattack.org/incident/malicious-code-in-xerohub-discord-voice-npm-8g63tn
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedcritical
Malicious code in autbank-core (npm)
The npm package autbank-core contained malicious preinstall and postinstall lifecycle hooks that exfiltrated environment variables, credentials, and system information to a hardcoded webhook.site endpoint during installation.
npmCompromised package - resolvedcritical
Malicious code in adxaa (npm)
The npm package adxaa contained obfuscated malicious JavaScript designed to target users of a specific WordPress site. The payload exfiltrates session data, deletes accounts, and hijacks credentials via email overwrite and password reset.
npmCompromised package - resolvedcritical
Malicious code in upload-to-gcp (npm)
upload-to-gcp@3.2.1 (npm) contains malicious code in its postinstall script that exfiltrates host identifiers to an attacker-controlled endpoint. The package masquerades as a Google Cloud Platform utility but performs unauthorized telemetry collection at install time.
npmCompromised package - resolvedcritical
Malicious code in akamai-sensor (npm)
A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.
npmCompromised packageTyposquatting