Vulnerability · Published Sep 3, 2024 · Assigned by GitHub_M
CVE-2024-45390@blakeembrey/template vulnerable to code injection when attacker controls template input
High 7.3
In plain English
A high-severity code injection in js-template from blakeembrey. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 38% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @blakeembrey/template | 1.2.0 | GHSA-q765-wm9j-66qj |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| blakeembrey | js-template | < 1.2.0 |
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L