CVE-2025-59140 in node-backslashinfo

Summary

by MITRE • 09/15/2025

backlash parses collected strings with escapes. 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 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. npm removed the offending package from the registry over the course of the day on 8 September, preventing further downloads from npm proper. On 13 September, the package owner published new patch versions to help cache-bust those using private registries who might still have the compromised version cached. Users should upgrade to the latest patch version, completely remove their node_modules directory, clean their package manager's global cache, and rebuild any browser bundles from scratch. Those operating private registries or registry mirrors should purge the offending versions from any caches. This issues is resolved in 0.2.2.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 09/16/2025

CVE-2025-59140 represents a sophisticated supply chain compromise targeting the npm registry ecosystem through a phishing attack that resulted in the publication of a malicious version of the backlash package. The vulnerability stems from the npm publishing account being compromised, allowing attackers to publish version 0.2.1 which appeared functionally identical to the previous patch but contained malicious code designed to intercept cryptocurrency transactions. This incident demonstrates how attackers can exploit the trust model of package managers by compromising legitimate publishing accounts rather than targeting individual packages directly. The attack specifically targeted browser environments where the compromised package could execute malicious code, making it particularly dangerous for web applications that bundle dependencies using tools like Babel, Rollup, Vite, or Next.js.

The technical flaw in this vulnerability lies in the package's handling of string parsing with escape sequences, which the attackers leveraged to inject malicious payload code that could operate within browser contexts. The malware specifically targets cryptocurrency wallets such as MetaMask, attempting to redirect transactions to attacker-controlled addresses. This represents a targeted attack pattern that aligns with common threat actor methodologies documented in the ATT&CK framework under T1195.002 for Supply Chain Compromise. The vulnerability operates at the application layer and requires the compromised package to be executed in a browser environment, making it distinct from traditional command execution vulnerabilities. The fact that local environments, server applications, and command line tools remain unaffected suggests the attack was specifically designed to exploit browser-based execution contexts.

The operational impact of CVE-2025-59140 extends beyond immediate transaction theft to encompass broader security implications for npm ecosystem users and organizations relying on third-party packages. The attack demonstrates how supply chain compromises can persist in cached environments, particularly affecting organizations using private registries or mirrors that may not have been updated with the patched version. The vulnerability's resolution in version 0.2.2 requires comprehensive remediation steps including complete node_modules directory removal, cache cleaning, and rebuild of browser bundles, highlighting the importance of proper dependency management and security hygiene. Organizations must understand that even patched versions may remain vulnerable if cached in private environments, creating a cascading effect that can compromise multiple systems simultaneously.

Security practitioners should consider this vulnerability as part of broader supply chain security frameworks, particularly focusing on the principles outlined in the CWE catalog under CWE-1037 for Supply Chain Attacks and CWE-494 for Downloading Code Without Integrity Check. The incident underscores the need for multi-factor authentication for npm accounts, regular security audits of published packages, and implementation of automated security scanning for dependencies. The targeted nature of the attack against cryptocurrency transactions aligns with threat actor motivations documented in various security intelligence reports, emphasizing the growing trend of financial motivation in software supply chain attacks. Organizations should implement continuous monitoring of their dependency trees and establish processes for rapid response to compromised packages, particularly those commonly used in browser environments where the attack vector is most dangerous. The timeline of events shows how quickly such attacks can spread and the importance of rapid response capabilities in mitigating supply chain compromises.

Responsible

GitHub M

Reservation

09/09/2025

Disclosure

09/15/2025

Moderation

accepted

CPE

ready

EPSS

0.00406

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!