Miggo Logo

CVE-2025-59145: color-name@2.0.1 contains malware after npm account takeover

N/A

CVSS Score

Basic Information

EPSS Score
0.1413%
Published
9/15/2025
Updated
9/15/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
color-namenpm= 2.0.12.0.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a result of a supply chain attack where a malicious version (2.0.1) of the color-name npm package was published. This version contained malware designed to steal cryptocurrency from users of applications that included this package. The malware activates in a browser environment, where it can intercept cryptocurrency transactions.

My analysis is based on a detailed report from Socket.dev, which includes a deobfuscated version of the malware's code. The malware's primary mechanism is to monkey-patch fundamental networking APIs, fetch and XMLHttpRequest, to inspect and tamper with network traffic.

The key malicious functions identified are:

  1. fetch and XMLHttpRequest.prototype.send overrides: These are the entry points for the malware to intercept application data. Any application logic that uses these functions for communication becomes a vector for the attack.
  2. replaceCryptoHashes: This is the core of the malicious logic, performing the search and replacement of cryptocurrency addresses.
  3. findNearestAddressLevenshtein: A supporting function for the address replacement, making the attack slightly more sophisticated.

These functions would appear in a runtime profile during the exploitation of the vulnerability, for instance, when a user of an affected web application initiates a cryptocurrency transaction. The profiler would show calls to the overridden fetch or XMLHttpRequest.prototype.send, which would then call replaceCryptoHashes.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t On * S*pt*m**r ****, *n npm pu*lis*in* ***ount *or `*olor-n*m*` w*s t*k*n ov*r **t*r * p*is*in* *tt**k. V*rsion `*.*.*` w*s pu*lis***, *un*tion*lly i**nti**l to t** pr*vious p*t** v*rsion, *ut wit* * m*lw*r* p*ylo** ***** *tt*mptin* to r**

Reasoning

T** vuln*r**ility is * r*sult o* * supply ***in *tt**k w**r* * m*li*ious v*rsion (`*.*.*`) o* t** `*olor-n*m*` npm p**k*** w*s pu*lis***. T*is v*rsion *ont*in** m*lw*r* **si*n** to st**l *rypto*urr*n*y *rom us*rs o* *ppli**tions t**t in*lu*** t*is p*