electro-sessionnpm
electro-session is a confirmed malicious npm package (MAL-2026-14242) that steals credentials and exfiltrates sensitive data (malicious versions 0.1.0, 0.1.1, 0.1.3…). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in electro-session (npm)
What this malware does
[email protected] presents itself as 'Session utilities' (~170-byte README) but ships ~1MB of heavily obfuscated JavaScript under dist/ (index.js, cli.js, run-once.js, schedule.js), all produced by javascript-obfuscator (listed in devDependencies) using an RC4-encrypted string array, rotating index accessor, and self-defending/debug-protection wrappers that hide every string, module path, URL, and file path. dist/index.js imports node:sqlite, node:fs, node:os, node:path, node:child_process, node:crypto and requires./schedule; package.json pins engines.node to >=22.5.0 (the release that introduced the built-in node:sqlite API) and declares @vercel/blob as a runtime dependency. The combination — built-in SQLite reader + child_process + crypto + a cloud blob upload SDK, wrapped in anti-analysis obfuscation — matches the fingerprint of an infostealer that reads local SQLite-backed credential/session stores (browser Login Data / Cookies / History, wallet extensions, chat app session DBs), decrypts them via child_process-invoked OS primitives, and uploads them via @vercel/blob. dist/schedule.js (imported by index.js) and the sibling dist/run-once.js implement the standard schedule-plus-payload persistence split via node:child_process, consistent with registering a recurring OS task (schtasks/cron/launchctl) that re-invokes run-once.js. There are no npm install lifecycle hooks; the payload is triggered when a developer runs the electro-session bin (dist/cli.js prompts a bilingual y/yes/s/si affirmative — English plus Spanish, indicating targeting of Spanish-speaking developers — then constructs new Sessions({...:true,...:true})), or when any module does require('electro-session') and instantiates Sessions (run-once.js does so unconditionally).
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Scan your lockfiles (package-lock.json, pnpm-lock.yaml, yarn.lock, requirements.txt, poetry.lock, etc.) and build artifacts for electro-session (4 malicious versions). O3 Security's supply-chain scanner checks every dependency against known-malicious package intelligence at install time and in CI, flagging electro-session across your stack and pipelines.
If you installed it — respond
electro-session is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If electro-session 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.
How O3 protects you
O3 blocks electro-session 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
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks electro-session-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.