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

ether-bn.jsnpm

Malicious code in ether-bn.js (npm) Remove it immediately and rotate any exposed credentials.

MAL-2026-4779
Immediate action
Remove the package, then rotate any secrets the build/runtime could reach.
npm uninstall ether-bn.js

What this malware does

Package name 'ether-bn.js' resembles the widely-used 'bn.js' big-number library, and the README directs users to install yet another name ('buffernumber.js'). The repository and homepage fields point at the legitimate indutny/bn.js project while the author field is unrelated. The shipped lib/bn.js is a near-verbatim copy of upstream bn.js with two non-upstream additions: a top-level const uniqueString = require('unique-id-64'); (lib/bn.js:38) and a check if (BN.isBN(number) && uniqueString(64)) { return number; } inside the BN constructor (lib/bn.js:20). package.json adds unique-id-64: ^1.0.0 to dependencies. The injected require is unconditionally evaluated when the module is loaded, and uniqueString(64) is invoked on every BN clone path, so any consumer that does new BN(existingBn) executes the third-party unique-id-64 package's code. The injected dependency is unpinned (^1.0.0) and is not a legitimate transitive of bn.js — it is the payload-delivery vehicle for whatever the third-party package contains now or in the future. Installers expecting bn.js semantics silently take a runtime dependency on attacker-selected code reached through a confusingly-named lookalike package.

Malicious versions

2 flagged
1.4.01.4.1

Indicators of compromise (SHA-256)

4cc5567869e3d616af151887f680ef13bf23f8a19fe5978343254b921c1c7c73
c00780a3026cf6886eb1c16dbfe7a20d9dea3ac9e12bd2de1a3856249df8d878

Detection & response playbook

Typosquat
  1. Find it

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

  2. If you installed it — respond

    ether-bn.js is a typosquat — you almost certainly intended a legitimately-named package. Remove ether-bn.js, install the correct package, and rotate any secrets exposed during the install since post-install scripts may have already run.

  3. Did it already run?

    If ether-bn.js 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 ether-bn.js 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. ether-bn.js on npm has been identified as a malicious package (versions 1.4.0, 1.4.1 flagged). It should be removed immediately — do not install or keep it in your dependency tree.

Campaign

IN-MAL-2026-004851IN-MAL-2026-004856

References

Credits

  • Amazon Inspector · finder

Detect & block this

O3 blocks ether-bn.js-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.

ether-bn.js (npm) malicious package — MAL-2026-4779 | O3 Security