Critical Malicious Code Vulnerability in better-md Package
Summary
MAL-2026-16446: Malicious code in better-md (npm). Affects better-md versions 99.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 better-md package is a Markdown parser and renderer for Node.js, widely used in various applications for converting Markdown text into HTML. It is favored for its simplicity and efficiency, making it a popular choice among developers. However, recent findings have revealed that this package contains malicious code, posing significant security risks to systems utilizing it.
Vulnerability Detail
The vulnerability stems from the inclusion of malicious code within the better-md package, which has been confirmed by security assessments from Amazon Inspector and GHSA. This malicious code can compromise any system where the package is installed, allowing unauthorized access to sensitive information such as secrets and keys. The implications of this vulnerability are severe, as it grants full control of the affected system to external entities, making it critical for users to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall better-md
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 measure, users can isolate the affected systems from the network to prevent further exploitation while they work on removing the package. Additionally, ensure that all secrets and keys stored on the compromised system are rotated from a secure environment.
Conclusion
The discovery of malicious code within the better-md package poses a serious threat to users and their systems. Immediate action is required to remove the package and secure any sensitive information. Utilizing tools like Vulert can help monitor and manage vulnerabilities effectively.
See every vulnerability recorded for better-md →
FAQ
better-md is a Markdown parser and renderer for Node.js, used to convert Markdown text into HTML.
If you have the better-md package installed, your system may be compromised. Use tools like Vulert to check for vulnerabilities.
Immediately rotate all secrets and keys stored on the affected system from a different, secure environment.
Yes, you can use Vulert, which monitors your package-lock.json for vulnerabilities in real-time without requiring code access.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without any signup.