Malicious Code Detected in fn-util Package - Security Alert
Summary
MAL-2025-20727: Malicious code in fn-util (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 fn-util package is a utility library in the npm ecosystem that provides various functions for handling and manipulating data. It is widely used in JavaScript applications for its simplicity and effectiveness. However, recent findings have revealed that this package contains malicious code, posing a significant security risk to applications that rely on it.
Vulnerability Detail
The vulnerability in the fn-util package originates from the inclusion of malicious code that can compromise the integrity of applications using this package. This code can lead to unauthorized access, data breaches, or even complete system takeover. The malicious nature of the code makes it imperative for developers to address this issue promptly to safeguard their applications and users.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall fn-util
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 fn-util package from your project and replace its functionality with alternative libraries that do not have known vulnerabilities. This can be done by uninstalling the package using the command: 'npm uninstall fn-util'.
Conclusion
The discovery of malicious code in the fn-util package highlights the importance of regularly monitoring and updating dependencies in software projects. Developers are urged to take immediate action to mitigate risks associated with this vulnerability by updating or replacing the affected package.
See every vulnerability recorded for fn-util →
FAQ
fn-util is a utility library in the npm ecosystem that provides functions for data manipulation and handling in JavaScript applications.
The malicious code found in fn-util can lead to unauthorized access and potential data breaches in applications that utilize this package.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By simply using your package-lock.json file, Vulert can help you identify if your application is affected.
Yes, you can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without requiring any signup or installation.
If immediate updates are not possible, consider removing the fn-util package and replacing it with alternative libraries that do not have known vulnerabilities.