Critical Malicious Code Vulnerability in function-flag Package
Summary
MAL-2026-17648: Malicious code in function-flag (npm). Affects function-flag versions 1.7.3. 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 function-flag package is a utility in the npm ecosystem that allows developers to manage feature flags in their applications. It is designed to enable or disable features dynamically, facilitating easier testing and deployment processes. However, this package has been identified as containing malicious code, posing a significant security risk to any system utilizing it.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the function-flag package, specifically version 1.7.3. This code can compromise any computer that has the package installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The origin of this vulnerability is linked to malicious actors who have intentionally inserted harmful code into the package, which can lead to severe security breaches and loss of data integrity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall function-flag
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 direct workarounds for this vulnerability other than removing the affected package. If your application relies on function-flag for feature management, consider implementing an alternative package that does not have known vulnerabilities.
Conclusion
The function-flag package has been identified as containing malicious code, posing a significant risk to any systems utilizing it. Immediate action is required to uninstall the package and secure any exposed sensitive information. Regular monitoring for vulnerabilities is essential to maintain the security of your applications.
See every vulnerability recorded for function-flag →
FAQ
The function-flag package is an npm utility that helps developers manage feature flags in their applications, allowing for dynamic enabling and disabling of features.
You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can access the Vulert playground at Vulert Scanner without any signup.
If you have the function-flag package installed, you should uninstall it immediately using 'npm uninstall function-flag' and rotate any sensitive information that may have been compromised.
Currently, there is no patched version of the function-flag package available. The only recommended action is to remove the package entirely.
Failing to address this vulnerability could lead to unauthorized access to sensitive data, potential data breaches, and complete compromise of the affected systems.