Malicious Code Detected in file-logging Package - Security Alert
Summary
MAL-2025-20548: Malicious code in file-logging (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 file-logging package is an npm module designed for logging file operations in JavaScript applications. It provides developers with a straightforward way to track and log file-related activities. However, recent findings have revealed that this package contains malicious code, posing a significant security risk to applications that utilize it.
Vulnerability Detail
The vulnerability in the file-logging package originates from the inclusion of malicious code that can compromise the integrity of applications using it. This malicious code can lead to unauthorized access, data breaches, and potential exploitation of the affected systems. The issue affects all versions of the package, starting from its initial release, making it critical for developers to address this vulnerability promptly.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall file-logging
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 avoid using the file-logging package and implement custom logging functionality in your application. For example, you can use the built-in 'fs' module in Node.js to log file operations manually.
Conclusion
The discovery of malicious code in the file-logging package poses a serious threat to applications that utilize it. Developers are urged to take immediate action by uninstalling the package and seeking secure alternatives. Continuous monitoring for updates and vulnerabilities is essential to maintain application security.
See every vulnerability recorded for file-logging →
FAQ
file-logging is an npm package used for logging file operations in JavaScript applications.
The malicious code can lead to unauthorized access and data breaches in applications using the package.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
You should uninstall the file-logging package immediately and consider using a secure alternative for logging.
Currently, there is no patched version available. It is recommended to uninstall the package until a secure version is released.
Related vulnerabilities
Recent vulnerabilities recorded for file-logging.