CVE-2025-59140: backslash@0.2.1 contains malware after npm account takeover
On 8 September 2025, the npm publishing account for backslash
was taken over after a phishing attack. Version 0.2.1
was published, functionally identical to the previous patch version, but with a malware payload added attempting to redirect cryptocurrency transactions to the attacker’s own addresses from within browser environments.
Local environments, server environments, command line applications, etc. are not affected. If the package was used in a browser context (e.g. a direct <script>
inclusion, or via a bundling tool such as Babel, Rollup, Vite, Next.js, etc.) there is a chance the malware still exists and such bundles will need to be rebuilt.
The malware seemingly only targets cryptocurrency transactions and wallets such as MetaMask. See references below for more information on the payload.
References
- github.com/Qix-/node-backslash
- github.com/Qix-/node-backslash/security/advisories/GHSA-53mq-f4w3-f7qv
- github.com/advisories/GHSA-53mq-f4w3-f7qv
- github.com/debug-js/debug/issues/1005
- nvd.nist.gov/vuln/detail/CVE-2025-59140
- socket.dev/blog/npm-author-qix-compromised-in-major-supply-chain-attack
- www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised
- www.ox.security/blog/npm-packages-compromised
Code Behaviors & Features
Detect and mitigate CVE-2025-59140 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →