CVE-2024-45390
CRITICAL 9.8CVSS 3.1@blakeembrey/template vulnerable to code injection when attacker controls template input
@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.
- Published
- 3 Sep 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-94
- Also known as
- GHSA-q765-wm9j-66qj
- Sources
- NVDJSONOSV GHSA-q765-wm9j-66qjJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | HIGH 7.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | blakeembrey | templatecpe:2.3:a:blakeembrey:template:*:*:*:*:*:node.js:*:* |
< 1.2.0 | 1.2.0 |
| OSV | npm | @blakeembrey/template | < 1.2.0 | 1.2.0 |
References
- https://github.com/blakeembrey/js-template/commit/b8d9aa999e464816c6cfb14acd1ad0f5d1e335aa · Patch, WEB
- https://github.com/blakeembrey/js-template/security/advisories/GHSA-q765-wm9j-66qj · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-45390 · ADVISORY
- https://github.com/blakeembrey/js-template · PACKAGE
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 3 Sep 2024)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 3 Sep 2024)