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.

Severity (CVSS 3.1)7.3High
Exploit odds (30 days)0.4%top 62.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
npm@blakeembrey/template1.2.0GHSA-q765-wm9j-66qj

Affected products (as reported)

VendorProductVersions
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

References