MAL-2026-4575Malicious code in happy-dlscord.js (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | happy-dlscord.js | * |
| npm | happy-dlscord.js | 14.16.3 |
{"schema_version":"1.7.4","id":"MAL-2026-4575","published":"2026-05-25T19:02:13Z","modified":"2026-08-20T12:27:56.039595852Z","aliases":["GHSA-6gjr-97pp-w2cw"],"summary":"Malicious code in happy-dlscord.js (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (2d183bf51c0f2be0102a7a7aeeda661f895e3b075f183d76d5f0f77c09c70860)\nThe package name 'happy-dlscord.js' is a one-character edit of the top-tier npm package 'discord.js' and ships a near-verbatim fork of the upstream library with an injected payload in src/client/Client.js. In Client.prototype.login(), once the client emits 'ready', the package POSTs the caller's Discord bot token to a hardcoded Discord webhook (https://discord.com/api/webhooks/1508514263197552690/...), wrapped in a JSON body containing the bot tag, id, and timestamp, with Arabic-labeled fields including '🔑 التوكن المفرز' formatting the token in spoiler tags. The webhook endpoint is unrelated to the package's stated purpose and is controlled by the attacker. Any developer who installs this package and calls client.login(token) — the standard, mandatory entry point of the library — silently surrenders their bot token to a third party, fully compromising the Discord bot (read all guild messages, send messages as the bot, modify the bot's account, persist beyond simple uninstall). Three independent block signals are present: typosquat of a top-100 package, hardcoded attacker-controlled exfiltration destination, and automatic firing on the library's primary documented API.\n\n## Source: ghsa-malware (370dc741a074186282148bb83e278321f7508c6e5ff3f75d1c098f8252b9fe58)\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.\n","affected":[{"package":{"name":"happy-dlscord.js","ecosystem":"npm"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["14.16.3"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"src/client/Client.js","sha256":"c6b2ebf6ad1c122618c7bd91076fc00e55b2377154c28f2750d1187b44b11136","tlsh":"82e2b6166bf9137241b360ba9f9b6081e836d70f32468894755d93fd0f49b3487bafa0"}],"package_integrity":[{"filename":"happy-dlscord.js-14.16.3.tgz","hashes":{"sha1":"309c45b5120b2e6b16da90e6baa11e4b8c357681","sha512_sri":"sha512-m8sVgcCHyqy5OjtTnXQqryMo5fCWExL/m51XM7UfkLtSOHW4Lc4NwQMhU5c0ukC3a/pW4cUZBdtAXydMIqnb8Q=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/happy-dlscord.js/v/14.16.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-6gjr-97pp-w2cw"}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-004763","import_time":"2026-05-26T05:53:14.129977239Z","modified_time":"2026-05-25T19:02:13Z","sha256":"2d183bf51c0f2be0102a7a7aeeda661f895e3b075f183d76d5f0f77c09c70860","source":"amazon-inspector","versions":["14.16.3"]},{"id":"GHSA-6gjr-97pp-w2cw","import_time":"2026-08-20T12:26:00.09786687Z","modified_time":"2026-08-20T11:32:15Z","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"sha256":"370dc741a074186282148bb83e278321f7508c6e5ff3f75d1c098f8252b9fe58","source":"ghsa-malware"}]},"credits":[{"name":"Amazon Inspector","contact":["actran@amazon.com"],"type":"FINDER"}]}数据来源:OpenSSF Malicious Packages · Apache-2.0