Critical Malicious Code Vulnerability in docs-root Package
Summary
MAL-2025-5392: Malicious code in docs-root (npm). Affects docs-root versions >= 1.0.0. 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 docs-root package is a Node.js library commonly used in web development for managing documentation and static site generation. It offers features such as customizable templates, easy integration with various content sources, and a user-friendly interface. However, recent findings have revealed that this package is susceptible to malicious code injection, which can compromise the security of applications relying on it.
Vulnerability Detail
The vulnerability identified in the docs-root package stems from its communication with a domain associated with malicious activity. This can lead to unauthorized data access, potential data breaches, and exploitation of the affected systems. The issue was introduced in version 1.0.0 and poses significant risks to users who have not updated to a secure version. Attackers can leverage this vulnerability to execute harmful scripts or steal sensitive information.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall docs-root
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, users can remove the docs-root package from their project until a secure version is available. This can be done using the command: 'npm uninstall docs-root'. Additionally, consider using alternative packages that do not have this vulnerability.
Conclusion
The docs-root package has a critical vulnerability that can expose applications to malicious attacks. It is essential for developers to update their packages promptly and consider using tools like Vulert for ongoing monitoring of vulnerabilities. By taking these steps, you can help secure your applications against potential threats.
See every vulnerability recorded for docs-root →
FAQ
The docs-root package is a Node.js library used for managing documentation and static site generation in web applications.
The vulnerability allows malicious code to be executed through the package, potentially leading to data breaches and unauthorized access.
You should update the docs-root package to the latest patched version immediately to mitigate the risk.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using just your package-lock.json file.
You can use the Vulert playground at Vulert Scanner to check if your application is affected without needing to sign up.