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

Fri, 09 Oct 2026 08:15:00 +0000

Type Values Removed Values Added
First Time appeared Handlebarsjs
Handlebarsjs handlebars
Vendors & Products Handlebarsjs
Handlebarsjs handlebars

Wed, 07 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-79
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 06 Oct 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 06 Oct 2026 19:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Handlebars: JavaScript Injection via Unsafe Inline Embedding of Precompiled Templates
Weaknesses CWE-116
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published: 2026-10-06T19:01:14.626Z

Updated: 2026-10-06T19:48:02.050Z

Reserved: 2026-10-06T16:49:40.590Z

Link: CVE-2026-106444

cve-icon Vulnrichment

Updated: 2026-10-06T19:47:56.780Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-06T20:17:26.130

Modified: 2026-10-07T13:58:29.527

Link: CVE-2026-106444

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-06T19:01:14Z

Links: CVE-2026-106444 - Bugzilla