Malicious Code Vulnerability in modalvalidator2 Package
Summary
MAL-2025-6635: Malicious code in modalvalidator2 (npm). Affects modalvalidator2 versions 1.0.0 – 1.0.1. 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 modalvalidator2 package is an npm library designed to facilitate modal validation in web applications. It provides developers with tools to ensure that user inputs in modal dialogs are correctly validated before submission. However, this package has been identified as containing malicious code, which poses significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability in modalvalidator2 arises from the inclusion of malicious code that can compromise the integrity of applications using this package. This code may lead to unauthorized access, data breaches, or other harmful actions within the affected systems. The malicious nature of the code was identified by ReversingLabs, highlighting the importance of scrutinizing third-party packages for security threats.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall modalvalidator2
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 remove the modalvalidator2 package from your project until a secure version is confirmed. To do this, run the following command: npm uninstall modalvalidator2. This will prevent any potential exploitation of the vulnerability while you assess alternative solutions.
Conclusion
The modalvalidator2 package has been found to contain malicious code, posing a significant risk to applications that utilize it. It is essential to update to the latest version or remove the package to safeguard your application from potential threats. Utilizing tools like Vulert can help monitor and alert you to such vulnerabilities in real-time.
See every vulnerability recorded for modalvalidator2 →
FAQ
modalvalidator2 is an npm package used for validating user inputs in modal dialogs within web applications.
The vulnerability involves malicious code embedded in the modalvalidator2 package, which can lead to security breaches.
You can use Vulert, which monitors open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert provides real-time alerts for any vulnerabilities, including those in modalvalidator2.
Yes, you can temporarily uninstall the modalvalidator2 package to eliminate the risk until a secure version is available.
The vulnerability was identified by ReversingLabs, a security research firm specializing in malware analysis.