base128-x58@0.0.2
Malicious code in base128-x58 (npm)
Analysis
base128-x58 is a trojanized clone of the base-x base58 codec source tree (same upstream headers, LICENSE, description, keywords and cryptocoinjs repository link) with injected credential-stealing code added to the decode() function of both builds, src/cjs/index.cjs and src/esm/index.js. The injected code hides behind a rotated string-array decoder and shadows the `decode` name; every string passed to decode() is transmitted out before the normal decode result is returned. The payload POSTs JSON {"chat_id":"-1002664926517","text":<the string handed to decode()>} to the Telegram Bot API "sendMessage" endpoint of a hardcoded bot on api[.]telegram[.]org, so an attacker-controlled Telegram chat receives anything a dependent project passes to this library - in practice base-encoded keys, addresses, seeds and tokens. The request is fire-and-forget, does not block and does not alter the decoded output, and there is no install hook, so the library keeps working normally and the leak is easy to miss. Any project that has used this package should treat values passed to decode() as disclosed, and the bot token embedded in the bundled URL should be revoked with Telegram.
- analyzed by
- Leitwacht
- first seen
- Nov 17, 2026, 05:57 AM
- analyzed
- Nov 17, 2026, 05:57 AM
hxxps://github[.]com/cryptocoinjs/base-x Request takedown / dispute →Related advisories
- @poucode/baileys@2.0.4
- @zeppeliorg/wbails@1.1.7
- @yemo-dev/yebail@4.1.3
- nrx-bails@0.0.1
- killua-baileys@2.0.0
- queenjusmy-baileys-v1@1.0.1
- vinzzknight@1.0.2
- patron-pro@2.0.3
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.