Malicious code in test_payload_folder (npm)
Description
The npm package 'test_payload_folder' version 1.0.0 contains malicious code that silently exfiltrates Discord user tokens supplied by callers. The package exposes a startVoiceJoiner(config) API that accepts Discord USER_TOKEN credentials and sends them to a hardcoded webhook URL controlled by the attacker. Although the published artifact uses a placeholder webhook URL that prevents exfiltration by default, a simple code modification can activate the token theft. Discord user tokens provide full account access, making this a serious security risk.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'test_payload_folder' npm package version 1.0.0 includes a function startVoiceJoiner(config) which accepts Discord user tokens as input. Before using these tokens for their intended purpose, the code constructs a payload containing the tokens, server ID, and channel ID, and sends this data via an HTTP POST request to a hardcoded Discord webhook URL. The webhook URL is initially set to a placeholder string, preventing exfiltration in the published package, but a single-line change to this constant enables the full token harvesting and exfiltration functionality. The package's name and Thai-language comments explicitly indicate the intent to relay tokens to the attacker. Discord user tokens are bearer credentials that grant full account access, so this behavior constitutes malicious credential theft.
Potential Impact
If the webhook URL is modified from the placeholder to an attacker-controlled endpoint, any user supplying their Discord user tokens to the startVoiceJoiner API will have those tokens exfiltrated to the attacker. Since Discord user tokens provide full access to the user's account, this can lead to account compromise, unauthorized actions, and potential further abuse. The default published package does not exfiltrate tokens due to the placeholder webhook, but the presence of the exfiltration code means the package is malicious and dangerous if altered.
Mitigation Recommendations
Users should avoid installing or using the 'test_payload_folder' npm package version 1.0.0. Since no official patch or remediation is provided, the safest action is to remove this package from any environment. Do not modify the webhook URL constant, as this activates the token exfiltration. Verify dependencies and audit packages for malicious code before use.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-14191
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a85b4caacd9273b49252b6a
Added to database: 08/19/2026, 13:51:06 UTC
Last enriched: 08/19/2026, 14:46:15 UTC
Last updated: 10/02/2026, 13:52:45 UTC
Views: 24
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.