Critical Malicious Code Vulnerability in date-fns-scripts Package
Summary
MAL-2026-1704: Malicious code in date-fns-scripts (npm). Affects date-fns-scripts versions 9.9.9. 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 date-fns-scripts package is a utility library for date manipulation in JavaScript, providing a variety of functions to handle dates effectively. It is widely used in web development for its simplicity and efficiency. However, this package has been identified as having a serious vulnerability that could potentially compromise applications relying on it.
Vulnerability Detail
The vulnerability originates from malicious code embedded within the date-fns-scripts package, specifically in version 9.9.9. This code could lead to unauthorized access or manipulation of user data, posing significant security risks to applications that utilize this package. The malicious code was identified by ReversingLabs, highlighting the importance of monitoring dependencies for security threats.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall date-fns-scripts
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
If an immediate update is not feasible, consider removing the date-fns-scripts package from your project until a secure version is released. You can do this using the command: npm uninstall date-fns-scripts.
Conclusion
The date-fns-scripts package has a critical vulnerability due to malicious code in version 9.9.9. It is essential for developers to update to a secure version or remove the package to protect their applications. Utilizing tools like Vulert can help monitor for such vulnerabilities in real-time.
See every vulnerability recorded for date-fns-scripts →
FAQ
date-fns-scripts is a JavaScript library that provides functions for manipulating dates, making it easier for developers to work with date-related tasks.
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.
As a temporary measure, you can uninstall the date-fns-scripts package to mitigate the risk until a secure version is available.
The vulnerability was discovered by ReversingLabs, a cybersecurity firm specializing in identifying malicious code in software packages.
Using the compromised version of date-fns-scripts could lead to unauthorized access to sensitive data, data manipulation, or other security breaches in your application.