Malicious Code Detected in elf-stats-merry-cookiejar-987: npm Package Vulnerability
Summary
MAL-2025-191975: Malicious code in elf-stats-merry-cookiejar-987 (npm). Affects elf-stats-merry-cookiejar-987 versions 1.0.1. 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 package 'elf-stats-merry-cookiejar-987' is an npm module designed for cookie management in web applications. It allows developers to easily handle cookies, including setting, getting, and deleting them. However, version 1.0.1 of this package has been identified as malicious, posing significant security risks to applications that utilize it.
Vulnerability Detail
The vulnerability in 'elf-stats-merry-cookiejar-987' arises from its communication with a domain linked to malicious activities. This behavior indicates that the package may execute harmful commands, potentially compromising the integrity and security of the applications that depend on it. The origin of this vulnerability is traced back to the package's design, which allows it to connect to external domains without proper safeguards, leading to unauthorized actions.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall elf-stats-merry-cookiejar-987
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 'elf-stats-merry-cookiejar-987' and implement cookie management manually or use a different, trusted package. For example, you can use the 'cookie' package as follows:
const cookie = require('cookie');
// Example of setting a cookie
const setCookie = (res, name, value) => {
res.setHeader('Set-Cookie', cookie.serialize(name, String(value), { httpOnly: true }));
};
Conclusion
The 'elf-stats-merry-cookiejar-987' npm package has been identified as malicious, posing serious security risks to applications. It is crucial for developers to remove this package and seek alternatives to safeguard their applications from potential threats.
See every vulnerability recorded for elf-stats-merry-cookiejar-987 →
FAQ
It is an npm package designed for managing cookies in web applications.
The package communicates with a domain associated with malicious activity and executes harmful commands.
You can use Vulert's playground at Vulert Scanner to check for vulnerabilities without any signup.
Remove the package and consider using a secure alternative or a different cookie management solution.
Currently, there is no patched version available. It is advisable to remove the package until a secure version is released.