cve.bz

CVE-2026-106444 handlebars-lang handlebars.js: Improper Encoding or Escaping of Output

4.7 mediumEPSS 0.3%Fix available

Medium (4.7) in handlebars-lang handlebars.js. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in handlebars 4.7.10.

On this page
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.

Severity

CVSS 3.1

4.7 medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 22nd percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: partial, assessed 2026-10-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-116 Improper Encoding or Escaping of Output
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-106444 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-106444?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-106444?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-106444 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
handlebars-lang handlebars.js>= 4.0.0, < 4.7.10

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-xw65-4hp5-5hc7npmhandlebars>=4.0.0 <4.7.104.7.10

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-handlebarsno fix listedDEBIAN-CVE-2026-106444
Debian14node-handlebars3:4.7.10-1DEBIAN-CVE-2026-106444
Ubuntu16.04:LTSruby-handlebars-assetsno fix listedUBUNTU-CVE-2026-106444
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 2 morenode-handlebarsno fix listedUBUNTU-CVE-2026-106444
Ubuntu24.04:LTSnode-handlebars, ruby-handlebars-assetsno fix listedUBUNTU-CVE-2026-106444

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

A moderate severity cross-site scripting (XSS) flaw was found in the Handlebars JavaScript template library. When serializing static template text into generated JavaScript, Handlebars.precompile() does not escape sequences that terminate an enclosing HTML script element. An application that precompiles attacker-controlled template text and embeds the generated source directly in an inline HTML script element can be attacked by a template containing a closing script tag delimiter: the enclosing script element is terminated early, and the attacker-controlled markup that follows is parsed and executed in the victim's browser session. Exploitation requires this specific usage pattern together with user interaction; ordinary server-side rendering of Handlebars templates, and precompiled templates delivered as external JavaScript files, are not affected. Red Hat rates this flaw Moderate impact (CVSS 4.7, CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N), consistent with the upstream rating. Within the Red Hat portfolio, this flaw is tracked against components of the hummingbird-1 update stream (Red Hat Hardened Images), where the Handlebars npm package appears as a dependency in component sources. These affects are delegated to the Hummingbird business unit, whose assessment resolved them as not affected because the vulnerable component is not present.

Red Hat's mitigation

This flaw can be avoided without upgrading: do not embed precompiled output from untrusted or attacker-controlled Handlebars templates directly in inline HTML script elements. Where practical, serve generated precompiled templates as external JavaScript files, or rely on ordinary server-side rendering, since those usage patterns are not affected. Restricting template precompilation to trusted template sources also prevents attacker-controlled template text from reaching Handlebars.precompile(). Updating Handlebars to the upstream fixed version (4.7.10) also resolves this issue.

ProductPackageStateAdvisory
Red Hat Hardened Imagesdotnet8.0Not affected
Red Hat Hardened Imagesgrafana12.4Not affected
Red Hat Hardened Imagesgrafana13.1Not affected
Red Hat Hardened Imagesgrafana13.2Not affected
Red Hat Hardened ImagesjaegerNot affected
Red Hat Hardened Imagesopentelemetry-collectorNot affected
Red Hat Hardened Imagesopentelemetry-collector-contribNot affected
Red Hat Hardened Imagesopentelemetry-collector-k8sNot affected
Red Hat Hardened Imagesprometheus3.13Not affected
Red Hat Hardened ImagesyarnpkgNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-106444.

Attack patterns (CAPEC)

  • CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON