CVE-2025-59142: color-string Package Malware Injection Due to npm Account Takeover

color-string Updated 14 Dec 2025

Summary

15/09/2025
Yes i
High
8.8

CVE-2025-59142: color-string@2.1.1 contains malware after npm account takeover. Affects color-string versions >= 2.1.1, < 2.1.2. Fixed in 2.1.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The color-string package is a popular npm library used for parsing and manipulating color strings in various formats. It is widely utilized in web development for tasks involving color management. However, it became vulnerable due to a security breach that allowed an attacker to publish a compromised version of the package.

Vulnerability Detail

On September 8, 2025, the npm publishing account for color-string was compromised through a phishing attack. The attacker published version 2.1.1, which was functionally identical to the previous version but included a malware payload designed to redirect cryptocurrency transactions to the attacker's addresses. This vulnerability primarily affects applications that use the package in browser contexts, potentially exposing users' cryptocurrency wallets to theft.

How To Fix

Latest published version: 2.1.4 as of 22 Oct 2026

npm install color-string@2.1.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.2

This is the first release that contains the fix.

npm install color-string@2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate updating is not possible, consider avoiding the use of the color-string package in browser environments until the update is applied. For those using private registries, ensure that the compromised version is purged from any caches.

Conclusion

The color-string package was compromised due to an npm account takeover, leading to the release of a malicious version that targets cryptocurrency transactions. Users are urged to update to the patched version and follow recommended cleaning procedures to mitigate risks.

See every vulnerability recorded for color-string →

Share this vulnerability

FAQ

You should immediately update to version 2.1.2 or later and follow the cleaning steps outlined in the 'how_to_fix' section.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. By checking your package-lock.json file, you can identify if your application is affected.

Failing to address this vulnerability may expose users to malware that can redirect cryptocurrency transactions, leading to potential financial loss.

Yes, the vulnerability primarily affects applications using the color-string package in browser contexts. Local and server environments are not impacted.

You can refer to the provided references in the advisory for detailed information about the incident and its implications.

Related vulnerabilities

Recent vulnerabilities recorded for color-string.

How To Fix

Latest published version: 2.1.4 as of 22 Oct 2026

npm install color-string@2.1.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.1.2

This is the first release that contains the fix.

npm install color-string@2.1.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback