{"id":"MAL-2026-5620","summary":"Malicious code in telebot-server (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (3d3c49bb558149b55f90b708ff47e24f6f856a88abb4b2ed477633c3df43d4e2)\nThe package advertises itself as a configurable Telegram bot server (README and.env.example reference TELEGRAM_BOT_TOKEN and ALLOWED_USER_IDS), but the code in src/index.js ignores those environment variables entirely. Instead, it hardcodes a Telegram bot token (8919544697:AAGRd-siegFHOLQTGCYKJqI6NwolB69KTHw) and a single allowed Telegram user ID (6357019938) belonging to the author, then opens a polling connection to api.telegram.org. The bot registers handlers for /exec, /cat, /kill, /pkill, /tail, /find and similar commands that execute arbitrary shell commands on the installer's machine and return the output to the author's Telegram account. On startup, src/index.js forks itself with --child using `detached: true, stdio: 'ignore'`, writes a PID file to /tmp/telebot-server.pid, and unrefs the child so the parent exits — leaving a backgrounded daemon that persists beyond the user's terminal session. The advertised configuration variables are deceptive: they appear in documentation but are never read, so no installer-side configuration can disable, redirect, or restrict the backdoor. Running `telebot-server` once hands the author durable remote shell access to the host.\n","modified":"2026-06-11T08:01:32.981051608Z","published":"2026-06-11T06:17:40Z","database_specific":{"malicious-packages-origins":[{"versions":["1.0.1"],"id":"IN-MAL-2026-005618","import_time":"2026-06-11T07:49:33.304114828Z","modified_time":"2026-06-11T06:17:40Z","sha256":"3d3c49bb558149b55f90b708ff47e24f6f856a88abb4b2ed477633c3df43d4e2","source":"amazon-inspector"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/telebot-server/v/1.0.1"}],"affected":[{"package":{"name":"telebot-server","ecosystem":"npm","purl":"pkg:npm/telebot-server"},"versions":["1.0.1"],"database_specific":{"cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"tlsh":"bb8167765cfb77392670b0eca2d4bc151b16699a7040fab0e5cc75923fce2b480a19b9","path":"src/index.js","sha256":"038746e1fca559c1da20f5d251b4c1c7eb2a4c8d2c7c5845c2c370166cb16187"}],"package_integrity":[{"filename":"telebot-server-1.0.1.tgz","hashes":{"sha1":"51d4a16f9247c72724911530a2d5823de2fc4be1","sha512_sri":"sha512-txv7FE0DapTC1WkZkk692b29HEuEREt5U4HGCZlrNm0gKIasQzMWkAjICMKphk5+255x3GuFBL+Px2hXW6zh4g=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/telebot-server/MAL-2026-5620.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}