Malicious Code Detected in tailwind-merge-v3 Package
Summary
MAL-2026-316: Malicious code in tailwind-merge-v3 (npm). Affected versions are not published. 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 tailwind-merge-v3 package is a utility designed for merging Tailwind CSS classes in a streamlined manner. It simplifies the process of applying multiple Tailwind classes by intelligently resolving conflicts and ensuring that the final output is optimized for performance. However, recent findings have revealed that this package contains malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code within the tailwind-merge-v3 package, identified by Amazon Inspector. This code can potentially compromise the security of applications, leading to unauthorized access, data breaches, or other malicious activities. The vulnerability affects all versions of the package, starting from version 0, making it imperative for users to take immediate action to mitigate risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall tailwind-merge-v3
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 a temporary workaround, you can avoid using the tailwind-merge-v3 package altogether and manually handle Tailwind CSS class merging in your application. This can be done by creating a utility function that merges classes without relying on the compromised package.
Conclusion
The tailwind-merge-v3 package has been found to contain malicious code, posing a significant security risk to applications that utilize it. Users are strongly advised to update the package or remove it from their projects until a secure version is released. Continuous monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for tailwind-merge-v3 →
FAQ
tailwind-merge-v3 is a utility for merging Tailwind CSS classes, designed to optimize the application of multiple classes in a streamlined manner.
The malicious code was identified by Amazon Inspector, a security tool that scans packages for vulnerabilities and malicious content.
Using the compromised package can lead to unauthorized access, data breaches, and other malicious activities that can severely impact your application's security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By uploading your package-lock.json file, you can check for vulnerabilities without needing to access the code or install anything.
Yes, you can use Vulert's playground to monitor your project for vulnerabilities in real-time. Simply visit Vulert Scanner and upload your package-lock.json file to check for any issues.