Critical Malicious Code Vulnerability in @emilgroup/docxtemplater-util Package
Summary
MAL-2026-2047: Malicious code in @emilgroup/docxtemplater-util (npm). Affects @emilgroup/docxtemplater-util versions 1.1.3. 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 @emilgroup/docxtemplater-util package is a utility library for handling document templates in Node.js applications. It is designed to facilitate the generation of documents by providing various functionalities to manipulate and fill templates. However, this package has been identified as containing malicious code, posing a significant risk to any system that utilizes it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the @emilgroup/docxtemplater-util package. This code can compromise the security of any computer where the package is installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of the code has been confirmed by security researchers, and it 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 @emilgroup/docxtemplater-util
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 workaround, ensure that the package is uninstalled from your project using the following command: npm uninstall @emilgroup/docxtemplater-util. Additionally, monitor your system for any unauthorized access or changes that may have occurred due to the malicious code.
Conclusion
The @emilgroup/docxtemplater-util package has been identified as containing malicious code that poses a significant security risk. Immediate action is required to remove the package and secure any sensitive information. Users should remain vigilant and utilize tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for @emilgroup/docxtemplater-util →
FAQ
You should immediately uninstall the package and rotate any sensitive information stored on the affected system.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.
Currently, there is no patched version available. The best course of action is to remove the package entirely.
Failure to address this vulnerability may lead to unauthorized access to sensitive data, potential data breaches, and complete compromise of the affected system.
It is highly recommended to avoid using this package until a secure version is released, as the risks outweigh the benefits.