winston-prism@1.0.1
Malicious code in winston-prism (npm)
Analysis
winston-prism@1.0.1 is a combosquat of the winston logger that downloads and executes remote code. The file lib/winston_prisma/prismalogger.js contains an immediately-invoked async function that base64-decodes a hardcoded URL ("aHR0cHM6Ly9qc29ua2VlcGVyLmNvbS9iLzJJRzZX" → hxxps://jsonkeeper[.]com/b/2IG6e), a header key ("eC1zZWNyZXQta2V5" → x-secret-key), and header value ("Xw==" → ]). It makes an HTTP GET to that URL with the custom header, extracts the "logger" field from the JSON response, compiles it via new Function.constructor("require", ...), and executes it with Node's require function — giving the remote payload full access to the filesystem, environment variables, and network. Retries up to 5 times on failure. The package impersonates the real winston logger (lists Charlie Robbins as author but is published by [account]).
- analyzed by
- Leitwacht
- first seen
- Jun 16, 2026, 04:13 AM
- analyzed
- Jun 16, 2026, 04:16 AM
Related advisories
- webpack-patch@1.1.7
- web3logger@1.1.1
- wao@0.41.2
- walletconnectionjs@1.1.1
- bubblestr@1.1.4
- util-free-ports@3.1.2
- ultra-base64-math@1.0.2
- txs-data@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.