Malicious Code Detected in mongodb-atlas-cli-toc-generator Package
Summary
MAL-2025-191517: Malicious code in mongodb-atlas-cli-toc-generator (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 mongodb-atlas-cli-toc-generator is an npm package designed to assist users in generating table of contents for MongoDB Atlas CLI documentation. It is intended to streamline the process of creating structured documentation for users of MongoDB Atlas. However, this package has been identified to contain malicious code, posing a significant security risk to users who integrate it into their projects.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the mongodb-atlas-cli-toc-generator package. This code can potentially compromise the security of applications that utilize this package, leading to unauthorized access, data breaches, or other malicious activities. The specific technical details of the malicious code have not been disclosed, but its presence indicates a severe risk to any application relying on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall mongodb-atlas-cli-toc-generator
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, consider using alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your dependencies using tools like Vulert, which can alert you to vulnerabilities in real-time. To check if your application is affected by this vulnerability, you can use the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The mongodb-atlas-cli-toc-generator package has been identified as containing malicious code, posing a significant risk to users. It is essential to remove this package from your projects and monitor for any updates or alternative solutions. Utilizing tools like Vulert can help in managing and monitoring vulnerabilities effectively.
See every vulnerability recorded for mongodb-atlas-cli-toc-generator →
FAQ
It is an npm package designed to help users generate table of contents for MongoDB Atlas CLI documentation.
The package contains malicious code that can compromise the security of applications using it.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities without needing to sign up.
You should remove the mongodb-atlas-cli-toc-generator package from your project and look for alternative solutions.
Currently, there is no mention of a patch. It is recommended to remove the package until a secure version is released.