Malicious Code Execution in css-relative-color-util Package
Summary
MAL-2026-17484: Malicious code in css-relative-color-util (npm). Affects css-relative-color-util versions 1.0.0. No fix is published. How to fix ↓
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.
No signup required · Results in about 60 seconds
Background
The css-relative-color-util package is a utility designed for handling CSS color manipulations within JavaScript applications. It is intended to simplify color-related tasks for developers. However, this package has been compromised, embedding malicious code that executes harmful commands upon loading, posing significant security risks to users.
Vulnerability Detail
The vulnerability originates from a malicious script embedded in the css-relative-color-util package, specifically within the thunderboltRegistry.js file. Upon module load, this script executes several system commands using child_process.execSync, including 'whoami', 'uname -a', 'cat /etc/hosts', and 'ifconfig/ip addr'. The output is then exfiltrated to a hardcoded webhook and a DNS collector, compromising user data and system integrity. The malicious behavior is disguised under the guise of a CSS utility, making it particularly insidious.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall css-relative-color-util
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As an immediate workaround, you can remove the css-relative-color-util package from your project to prevent the execution of the malicious code. Use the following command: 'npm uninstall css-relative-color-util'. Consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The css-relative-color-util package has been found to contain malicious code that poses serious security risks. It is crucial for developers using this package to take immediate action by updating or removing it to safeguard their applications and systems.
See every vulnerability recorded for css-relative-color-util →
FAQ
css-relative-color-util is a JavaScript utility designed for manipulating CSS colors, but it has been compromised with malicious code.
The malicious code executes system commands that can expose sensitive information and compromise system security.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without signup.
If an update is not available, the best course of action is to remove the package from your project and seek alternative solutions.
For further inquiries, you can reach out to Amazon Inspector at inspector-research@amazon.com.