pretie_x1npm
Malicious code in pretie_x1 (npm) Remove it immediately and rotate any exposed credentials.
What this malware does
pretie_x1 impersonates the popular prettier package (description copies prettier's tagline; keywords include 'prettier', 'format', 'formatter') but ships no formatter functionality. On npm install, package.json's scripts.install runs node cli.js, which reaches lib/mirror.js. That file stores two C2 URLs as base64 literals (GUARD_LOC decoding to https://api.aavcareer.ink/install_guard_d.js and a fallback decoding to https://deep-ai-guard.store/install_guard_d.js), downloads JavaScript via https.get with rejectUnauthorized: false (TLS certificate validation disabled), writes it to os.tmpdir()/bsl-<pid>.js, and executes it via spawn(process.execPath, [dest]) detached and hidden. The base64 encoding of the endpoints, the disabled TLS verification, and the hidden detached spawn collectively confirm intent to evade scanners and execute attacker-controlled code on the installer's machine. Any developer who mistypes 'prettier' as 'pretie_x1' grants the attacker arbitrary code execution under their user account.
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