CVE-2026-106444
MEDIUM 4.7CVSS 3.1Handlebars: JavaScript Injection via Unsafe Inline Embedding of Precompiled Templates
Handlebars provides the power necessary to let users build semantic templates. From 4.0.0 until 4.7.10, Handlebars.precompile() uses quotedString() in lib/handlebars/compiler/code-gen.js to emit static template text into generated JavaScript without escaping sequences that terminate an enclosing HTML script element. When an application precompiles attacker-controlled template text and embeds the generated source directly in an inline script element, a closing script delimiter can end the element and cause following attacker-controlled markup to be parsed and executed. Ordinary server-side rendering and precompiled templates served as external JavaScript files are not affected. This issue is fixed in version 4.7.10.
- Published
- 6 Oct 2026
- Last modified
- 8 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Awaiting Analysis
- Weakness
- CWE-116
- Also known as
- GHSA-xw65-4hp5-5hc7
- Sources
- NVDJSONOSV GHSA-xw65-4hp5-5hc7JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | npm | handlebars | >= 4.0.0, < 4.7.10 | 4.7.10 |
References
- https://github.com/handlebars-lang/handlebars.js/commit/609d1b11c833c9a3e00f56f2f34d22f425446725 · WEB
- https://github.com/handlebars-lang/handlebars.js/pull/2185 · WEB
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10 · WEB
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7 · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-106444 · ADVISORY
- https://github.com/handlebars-lang/handlebars.js · PACKAGE
History
- 25 Nov 2026 21:22 UTC · NVD: first stored (published 6 Oct 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 8 Oct 2026)