{"id":"CVE-2026-106444","summary":"Handlebars: JavaScript Injection via Unsafe Inline Embedding of Precompiled Templates","details":"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.","aliases":["GHSA-xw65-4hp5-5hc7"],"modified":"2026-10-08T02:49:18.682476282Z","published":"2026-10-06T19:01:14.626Z","database_specific":{"cwe_ids":["CWE-116"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/106xxx/CVE-2026-106444.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/106xxx/CVE-2026-106444.json"},{"type":"ADVISORY","url":"https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-106444"},{"type":"FIX","url":"https://github.com/handlebars-lang/handlebars.js/commit/609d1b11c833c9a3e00f56f2f34d22f425446725"},{"type":"FIX","url":"https://github.com/handlebars-lang/handlebars.js/pull/2185"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/handlebars-lang/handlebars.js","events":[{"introduced":"bff5fab8f9d42e21950be00dcf1cedf4dc1a565b"},{"fixed":"609d1b11c833c9a3e00f56f2f34d22f425446725"},{"fixed":"45ce15255e0f430ac6d19742b18e316b7539264e"}],"database_specific":{"source":["AFFECTED_FIELD","REFERENCES"],"extracted_events":[{"introduced":"4.0.0"},{"fixed":"4.7.10"}]}}],"versions":["v4.7.9","v4.7.8","v4.7.7","v4.7.6","v4.7.5","v4.7.4","v4.7.3","v4.7.2","v4.7.1","v4.7.0","v4.6.0","v4.5.3","v4.5.2","v4.5.1","v4.5.0","v4.4.3","v4.4.2","v4.4.1","v4.2.1","v4.3.4","v4.4.0","v4.3.3","v4.3.2","v4.3.1","v4.3.0","v4.2.0","v4.1.2-0","v4.1.2","v4.1.1","v4.0.12","v4.0.11","v4.0.10","v4.0.9","v4.0.8","v4.0.7","v4.0.6","v4.0.5","v4.0.4","v4.0.3","v4.0.2","v4.0.1","v4.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-106444.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}