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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| handlebars-lang | handlebars.js | >= 4.0.0, < 4.7.10 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | node-handlebars | 3:4.7.10-1 | — |
| Debian 13 | node-handlebars | No fix yet | — |
| Debian 12 | node-handlebars | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | node-handlebars | No fix yet | — |
| Ubuntu 26.04 LTS | node-handlebars | No fix yet | — |
| Ubuntu 24.04 LTS | node-handlebars +1 | No fix yet | — |
| Ubuntu 22.04 LTS | node-handlebars | No fix yet | — |
| Ubuntu 20.04 LTS | node-handlebars | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | node-handlebars | No fix yet | — |
| Ubuntu 16.04 LTS | ruby-handlebars-assets | No fix yet | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | lerna | 10.0.1-r10 | — |
| Wolfi rolling | nextcloud-server-33 | 33.0.9-r7 | — |
| Wolfi rolling | opensearch-dashboards-3 | 3.8.0-r13 | — |
| Wolfi rolling | prism | 5.16.0-r16 | — |
| Wolfi rolling | rancher-api-ui | 1.2.3-r15 | — |
| Wolfi rolling | renovate | 44.133.0-r5 | — |
| Wolfi rolling | tileserver-gl | 5.6.0-r20 | — |
| Wolfi rolling | ts-patch | 4.0.1-r48 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | handlebars | >= 4.0.0, < 4.7.10 | 4.7.10 | GHSA-xw65-4hp5-5hc7 |
Advisories 1
- WID-SEC-2026-4410 IBM App Connect Enterprise: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
References
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xw65-4hp5-5hc7
- https://github.com/handlebars-lang/handlebars.js/pull/2185
- https://github.com/handlebars-lang/handlebars.js/commit/609d1b11c833c9a3e00f56f2f34d22f425446725
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.10