Critical Malicious Code Vulnerability in flex-config Package
Summary
MAL-2025-20696: Malicious code in flex-config (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 flex-config package is an npm module designed to facilitate flexible configuration management in JavaScript applications. It allows developers to easily manage and switch between different configurations based on the environment. However, the package has been identified to contain malicious code, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability in the flex-config package stems from the inclusion of malicious code that can compromise the security of applications using this package. This code may lead to unauthorized access, data breaches, or other harmful actions within the affected systems. The vulnerability was introduced in version 0 and affects all subsequent versions, making it critical for users to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall flex-config
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, consider removing the flex-config package from your project until a secure version is released. You can do this by running the command: 'npm uninstall flex-config'. This will prevent any potential exploitation of the malicious code while you seek alternative solutions.
Conclusion
The flex-config package has been found to contain malicious code, posing a serious threat to applications that rely on it. Users are urged to update or uninstall the package to safeguard their applications. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.
See every vulnerability recorded for flex-config →
FAQ
flex-config is an npm package used for managing configurations in JavaScript applications, allowing developers to easily switch between different settings based on their environment.
The malicious code was identified by security researchers from Amazon Inspector, who regularly monitor open-source packages for vulnerabilities.
Using the compromised package can lead to unauthorized access to sensitive data, potential data breaches, and other harmful actions that can affect the integrity and security of your application.
Yes, you can use Vulert, a tool that monitors and alerts for open-source vulnerabilities in real-time. By simply uploading your package-lock.json file, you can check for vulnerabilities without needing to install any software.
If you cannot update the package right away, it is advisable to uninstall it as a temporary measure to mitigate the risk of exploitation until a secure version is available.