pretty-pino-logger@2.0.2
Malicious code in pretty-pino-logger (npm)
Analysis
A credential-stealing backdoor combosquatting pino-pretty and posing as a colorized logger. On require(), dist/logger.js immediately fingerprints the host (platform, IP address(es), username); on Linux writes a hardcoded ssh-rsa public key into ~/.ssh/authorized_keys for persistent SSH access; recursively walks the filesystem (home dirs, /home on Linux, drive roots on Windows, /Users on macOS) collecting .env and .json files while skipping node_modules; and exfiltrates the collected data via HTTP POST to logger.clob[.]health — system info to /api/validate/system-info, scraped env/json files to /api/validate/files, and the project-local .env to /api/validate/project-env. The exposed dist/index.js exports a harmless Logger class as a decoy.
- analyzed by
- Leitwacht
- first seen
- Jun 12, 2026, 01:15 PM
- analyzed
- Jun 12, 2026, 01:16 PM
Related advisories
- prettier-logger@0.1.4
- pino-pretty-logger@1.1.1
- pino-formatter@1.1.12
- internallib_v557@1.0.5
- npm-doc-dev@1.0.9
- node-fetch-lite@1.0.2
- parket-slot@0.0.6
- websocket-slot@0.0.6
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.