Critical Malicious Code Vulnerability in brat-generator Package
Summary
MAL-2026-17674: Malicious code in brat-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 brat-generator package is an npm module designed for generating various types of content. It is commonly used in web development projects for its ease of use and flexibility. However, this package has been found to contain malicious code that compromises the security of any system it is installed on, making it a significant risk for developers and organizations relying on it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the brat-generator package. This code can grant unauthorized access to the system, allowing attackers to control the affected computer fully. As a result, any secrets or keys stored on the system may be exposed, leading to potential data breaches and further exploitation. The vulnerability is classified under CWE-506, indicating that the product contains embedded malicious code.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall brat-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
There are no effective workarounds for this vulnerability. The only recommended action is to uninstall the brat-generator package and secure the system.
Conclusion
The brat-generator package poses a serious security risk due to the presence of malicious code. Immediate action is required to remove the package and secure any sensitive information. Regular monitoring of open-source packages is essential to prevent similar vulnerabilities in the future.
See every vulnerability recorded for brat-generator →
FAQ
Brat-generator is an npm module used for generating various types of content in web development.
The malicious code can grant attackers full control over your system, potentially leading to data breaches.
You should immediately uninstall the brat-generator package and rotate any sensitive information stored on your system.
No, there is currently no patched version available for the brat-generator package.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just package-lock.json. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.