MAL-2026-13377Malicious code in ezdiscordbots (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | ezdiscordbots | 1.0.2 |
{"modified":"2026-08-05T21:18:27Z","published":"2026-08-05T21:18:27Z","schema_version":"1.7.4","id":"MAL-2026-13377","summary":"Malicious code in ezdiscordbots (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (a715452291e1bd779802f51dc90eca91740307e0bee7b9e2ca94f6f863f6a921)\npackage.json declares a postinstall script `sudo node install.js` that runs install.js with root privileges on the installer's machine. Both install.js and index.js are heavily obfuscated (js-virtualizer / obfuscator.io family): hex-mangled identifiers, rotated string array, control-flow flattening, anti-debug regex checks, and a base64/percent-decoded string reconstructor. index.js concatenates four decoder-produced fragments and passes the result through Buffer.from(dora, 'base64').toString() at module load to materialize executable content that is not visible in the shipped source. The declared runtime dependencies include js-virtualizer (obfuscator) and node-linux (systemd/init daemon registration) — neither has any connection to the advertised Discord bot purpose, and node-linux provides the primitives to install a persistent root-level daemon. The combination of sudo-elevated postinstall, obfuscated self-decoding payload, and a Linux service-installer dependency is the canonical install-time RCE / persistence shape; installing this package causes attacker-controlled code to execute as root on the installer host.\n","affected":[{"package":{"ecosystem":"npm","name":"ezdiscordbots"},"versions":["1.0.2"],"database_specific":{"cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"package.json","sha256":"e502a73dd7e8ec73c924d3e23f55cc6add6e7301f761fef72e6dda313b8953a2","tlsh":"bae07d040c18e73326c09fe8ac32555bbf8b0658510d982803a35108c3ed3bb587fb07"},{"path":"index.js","sha256":"a7890cffb9883ee0c1e3d7ca0dfbcb36f47359a9af839ae60390afc0751c33ec","tlsh":"97f200c467d1f803624f4b737b1b76e5e53a5caa70c8688be1147d88f8ad602e6e4c74"}],"package_integrity":[{"filename":"ezdiscordbots-1.0.2.tgz","hashes":{"sha1":"bbc31d49df588dd8c052b669caa304043e1b8fa0","sha512_sri":"sha512-E5CHriREqf+PTI9Dvi4IkH7aqxML3q+d27Tu/nuOKmnVTS/p2eVJ4wvDlGKYYDsbQBTO0CfJP5+zIcqHOfOq6g=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/ezdiscordbots/v/1.0.2"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-015892","import_time":"2026-08-05T21:31:21.070706177Z","modified_time":"2026-08-05T21:18:27Z","sha256":"a715452291e1bd779802f51dc90eca91740307e0bee7b9e2ca94f6f863f6a921","source":"amazon-inspector","versions":["1.0.2"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0