Malicious code in electro-session (npm)
electro-session@0.1.3 (npm) contains malicious code disguised as session utilities. The package ships heavily obfuscated JavaScript that implements an infostealer, exfiltrating browser credentials, wallet data, and chat app sessions via cloud storage.
- Disclosed
- Last updated
- Blast radius
- Any Node.js application that installed electro-session@0.1.3, particularly those running on Node.js >=22.5.0
- Ecosystems
- Attack vectors
- Affected entities
- electro-session · 0.1.3
electro-session@0.1.3 was published to npm with a deceptive package.json claiming to provide session utilities, but the actual distribution code (~1MB of obfuscated JavaScript) implements credential theft functionality.
The malicious payload uses javascript-obfuscator with RC4-encrypted string arrays and self-defending wrappers to hide its true behavior. It imports Node.js built-in modules (sqlite, fs, os, path, child_process, crypto) and the @vercel/blob SDK, a combination consistent with reading SQLite-backed credential stores (browser Login Data, Cookies, History, wallet extensions, chat app session databases), decrypting them via OS-level primitives, and uploading them to cloud storage.
The package pins Node.js engines to >=22.5.0 (when built-in node:sqlite was introduced) and implements persistence via scheduled tasks (schtasks/cron/launchctl) using child_process invocation, ensuring the infostealer runs repeatedly.
This represents a direct supply chain compromise where malicious code was published under a legitimate-sounding package name.
Indicators of compromise
- Packages
- electro-session@0.1.3
Remediation
- Immediately uninstall electro-session from all projects
- Audit npm install logs to identify when electro-session@0.1.3 was installed
- Assume any system that ran npm install with this package is compromised; rotate all credentials (browser passwords, API keys, wallet seeds, chat app tokens)
- Review Node.js process logs for unexpected child_process invocations or scheduled task creation
- Scan for persistence mechanisms (cron jobs, launchctl plists, Windows scheduled tasks) that may have been created
- Update to a patched version if one is released, or remove the dependency entirely
Sources
- GitHub Advisory GHSA-p8hr-jfjq-mfmf · GitHub Advisory Database
Cite this entry
"Malicious code in electro-session (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 19, 2026; last updated August 19, 2026. https://supplychainattack.org/incident/malicious-code-in-electro-session-npm-uruqtk
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- containedcritical
Malicious code in 3-buildsight-web (npm)
The npm package 3-buildsight-web contains malicious code that fetches and executes arbitrary JavaScript from a remote Bitbucket URL on module load, granting full page privileges to an unverified third party.
npmCompromised package - resolvedcritical
Malicious code in @usaa-grp-personal-profile/personal-profile-common (npm)
Malicious package @usaa-grp-personal-profile/personal-profile-common version 999.0.0 published to public npm as a dependency-confusion attack targeting an organization's internal registry. The package contains preinstall and postinstall hooks that exfiltrate hostname, username, and working directory to an attacker-controlled OAST endpoint on every install.
npmDependency confusionCompromised package - resolvedcritical
Malicious code in create-coin (npm)
create-coin@20.1.1 on npm contained malicious postinstall code that collected sensitive environment variables, credentials, and host reconnaissance data. The package impersonated an esbuild platform build and exfiltrated data to a hardcoded endpoint.
npmCompromised packageTyposquatting - resolvedcritical
Malicious code in @syncraft-labs/vue (npm)
The npm package @syncraft-labs/vue version 0.4.1 contained malicious obfuscated code in its ESM build that implements a blockchain-hosted C2 dropper (EtherHiding pattern), enabling remote code execution on any consumer importing the package.
npmCompromised package