tronweb-crypto@6.3.1
Malicious code in tronweb-crypto (npm)
Analysis
This package masquerades as the legitimate TRON web3 library (it even pulls the real tronweb in as a dependency) and ships a single heavily obfuscated module. The code is produced by javascript-obfuscator: identifiers are renamed to _0x-style names, method names are hidden behind hex escapes, and the meaningful strings are hidden in an array decoded at runtime by a base64/RC4 routine. The package exports a Signature function that wraps the normal signing flow, then exfiltrates the captured key/signature material by building a request with fetch and POSTing it (method/headers/Content-Type/body) to a Telegram bot, using the Telegram sendMessage fields chat_id and text. The destination URL and bot token are kept encrypted in the string array and only decoded at runtime to evade static detection. Anyone importing this package to sign TRON transactions would leak their private key/signing data to the attacker.
- analyzed by
- Leitwacht
- first seen
- Jun 15, 2026, 06:53 AM
- analyzed
- Jun 16, 2026, 04:57 PM
Related advisories
- chai-plugin-kit@5.8.1
- nat-ulid@3.0.2
- yellow-discord-lookup-v1@1.0.3
- winston-prism@1.0.1
- webpack-patch@1.1.7
- web3logger@1.1.1
- wao@0.41.2
- walletconnectionjs@1.1.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.