Critical Malicious Code Vulnerability in modern-react Package
Summary
MAL-2025-5936: Malicious code in modern-react (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 modern-react package is a popular library in the npm ecosystem, designed to facilitate the development of modern web applications using React. It provides developers with a set of tools and components that streamline the process of building user interfaces. However, this package has been identified to contain malicious code, posing significant security risks to any application that utilizes it.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the modern-react package. This code can compromise the security of any system where the package is installed, allowing unauthorized access to sensitive information, including secrets and keys. The malicious nature of this code has been confirmed through various sources, indicating that any computer running this package should be considered fully compromised. The ramifications of this vulnerability are severe, as it can lead to data breaches and loss of control over the affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall modern-react
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
There are no effective workarounds for this vulnerability other than removing the package entirely. Ensure that you monitor your systems for any unusual activity following the removal.
Conclusion
The modern-react package has been identified as containing malicious code that poses a serious security threat. Immediate action is required to remove the package and secure any sensitive information. Utilizing tools like Vulert can help in monitoring for such vulnerabilities in the future.
See every vulnerability recorded for modern-react →
FAQ
Immediately remove the modern-react package from your project and rotate any sensitive information stored on the affected system.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.
Failing to address this vulnerability can lead to unauthorized access to sensitive data, potential data breaches, and loss of control over your systems.
The only effective mitigation is to remove the package entirely, as there are no safe workarounds available.
Utilize tools like Vulert, which monitors your package-lock.json for vulnerabilities in real-time, ensuring you are alerted to any issues as they arise.