random-transactions-sdknpm
Advisory published Updated
random-transactions-sdk is a confirmed malicious npm package (MAL-2026-21085) that executes malicious code on install (malicious versions 1.0.1, 1.0.4). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in random-transactions-sdk (npm)
What this malware does
[email protected] ships a database.js data file containing ~54KB of base64-encoded 'mark' fields. The documented getTransactions() API calls load_transaction_data(), which concatenates these fields, applies a Caesar shift keyed on the caller-supplied count argument, base64-decodes the result, and passes the resulting source into the Function constructor with Buffer, require, and process injected as parameters. The code uses a hex-named string-array (_0x1a2b) to reconstruct the identifiers 'setTimeout', 'Function', 'Buffer', 'require', 'process', and 'clearTimeout' from fragments rather than referencing them directly, and wraps the execution in a silent try/catch. A random-transaction generator has no legitimate reason to reconstruct and evaluate obfuscated JavaScript from a shipped data blob with full require and process access; the Caesar shift keyed on a user argument conceals the payload bytes from static inspection, and the identifier obfuscation of standard builtins is a canonical evasion pattern. The dynamic execution fires on normal use of the package's advertised export, giving the hidden payload full Node.js process capabilities (filesystem, network, child_process via require) in the installer's process.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Malicious packageFind it
Search your lockfiles and build artifacts for random-transactions-sdk (2 malicious versions).
If you installed it — respond
Remove random-transactions-sdk from your project and lockfile, then assume any secrets accessible to the build or runtime were exposed: rotate API keys, tokens, and credentials, and audit for unexpected outbound activity or persistence.
Did it already run?
If random-transactions-sdk was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks random-transactions-sdk-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the malicious outbound activity and severs the channel.