Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
Malicious package

ts-rand-sdknpm

ts-rand-sdk is a confirmed malicious npm package (MAL-2026-14193) that executes malicious code on install (malicious version 1.0.2). Do not install it — remove it immediately and rotate any exposed credentials.

Malicious code in ts-rand-sdk (npm)

MAL-2026-14193
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall ts-rand-sdk

What this malware does

Package presents itself as a random transactions SDK exposing a single API, getTransactions(count). Following that documented usage triggers a hidden loader: load_transaction_data reads database.js (framed as a product catalog), takes each record's mark field, base64-decodes it, applies a per-record byte shift keyed on count % 256, concatenates the fragments in id order, base64-decodes the result again, and passes the resulting JavaScript source into a Function constructor obtained indirectly via globalThis.constructor.constructor. The constructed function is invoked with Buffer, require, and process passed in, giving the decoded payload full Node.js capabilities (arbitrary filesystem, process, and network access) on the caller's machine. Sensitive identifiers (setTimeout, Function, Buffer, require, process, clearTimeout) are stored as fragments in a string array and reassembled at runtime via an index-mapping helper, and execution is deferred through setTimeout, both patterns serving only to hide the payload path from reviewers. The ~54KB of mark shards inside database.js are the concealed code body; the product-catalog framing is cover. The package's advertised functionality is a facade over a runtime code-execution loader.

Malicious versions

1 flagged
1.0.2

Indicators of compromise (SHA-256)

7f3c43a89866228b5365b9e318da3ea953bb2c5b7da94136d887359e8e1f07a8

Detection & response playbook

Malicious package
  1. Find it

    Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for ts-rand-sdk (version 1.0.2). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging ts-rand-sdk across your stack and pipelines.

  2. If you installed it — respond

    Remove ts-rand-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.

  3. Did it already run?

    If ts-rand-sdk was ever installed, its post-install/runtime payload may have already executed. O3's L7 egress monitoring and runtime eBPF sensors detect the credential exfiltration or command-and-control callback after install and block the malicious outbound channel, so you catch and contain the actual compromise — not just the presence of the package.

  4. How O3 protects you

    O3 blocks ts-rand-sdk before install through its supply-chain scanner, and if it has already run, detects and severs the exfiltration or C2 callback at runtime through L7 egress monitoring and eBPF.

Frequently asked questions

No. ts-rand-sdk on npm has been identified as a malicious package (version 1.0.2 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-018264

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks ts-rand-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.

Explore

ts-rand-sdk (npm) malicious package — MAL-2026-14193 | O3 Security