Intel

AIKIDO-2026-869467

handlebars is vulnerable to Cross-Site Scripting (XSS)

CVE-2026-106444Published Oct 8, 2026
October 8, 2026

47

CVE Score

Medium

Cross-Site Scripting (XSS)

Are you affected? Scan for Free

TL;DR

quotedString() in lib/handlebars/compiler/code-gen.js serializes static template text into the generated JavaScript source without escaping the </script> sequence. Precompiled output containing </script> closes an enclosing HTML <script> element, letting a following <script> tag be parsed and executed by the browser. This affects applications that precompile untrusted templates and embed the generated source inline in an HTML document. The fix escapes script closing delimiters in generated string and source location literals.

How do I fix this?

Upgrade the handlebars library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you embed Handlebars.precompile() output from untrusted templates directly in an inline <script> element.

Package

Versions

4.0.0 - 4.7.9

Fixed in 4.7.10

Background info

handlebars is vulnerable to Cross-Site Scripting (XSS) in versions 4.0.0 - 4.7.9.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea