What’s Vulnerable › Vulnerabilities
CVE-2024-45390: @blakeembrey/template vulnerable to code injection when attacker controls template input
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-09-03 · updated 2026-06-17
- Weakness: CWE-94
Description
@blakeembrey/template is a string template library. Prior to version 1.2.0, it is possible to inject and run code within the template if the attacker has access to write the template name. Version 1.2.0 contains a patch. As a workaround, don't pass untrusted input as the template display name, or don't use the display name feature.
Affected products
- blakeembrey js-template: before 1.2.0 — fixed in 1.2.0
How to fix
Upgrade to a fixed version: blakeembrey js-template 1.2.0. Check the vendor advisory for mitigations.
References
- https://github.com/blakeembrey/js-template/commit/b8d9aa999e464816c6cfb14acd1ad0f5d1e335aa
- https://github.com/blakeembrey/js-template/security/advisories/GHSA-q765-wm9j-66qj
Get alerted when CVE-2024-45390 or the next vulnerability affects your stack