---
id: CVE-2026-106444
title: Handlebars provides the power necessary to let users build semantic templates
summary: >-
  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 JavaSc…
severity: medium
cvss: 4.7
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'
cwe:
  - CWE-116
vendor: handlebars-lang
product: handlebars.js
affected:
  - 'handlebars.js >= 4.0.0, < 4.7.10'
published: '2026-10-06'
updated: '2026-10-06'
sourceUpdated: '2026-10-06T20:17:26.130'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-106444'
references:
  - url: >-
      https://github.com/handlebars-lang/handlebars.js/commit/609d1b11c833c9a3e00f56f2f34d22f425446725
    label: security-advisories@github.com
  - url: 'https://github.com/handlebars-lang/handlebars.js/pull/2185'
    label: security-advisories@github.com
  - url: 'https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10'
    label: security-advisories@github.com
  - url: >-
      https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7
    label: security-advisories@github.com
  - url: >-
      https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-06T19:47:42.547607Z'
ingestedAt: '2026-10-06T20:16:42.480Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
