Intel

AIKIDO-2026-869467

handlebars is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)CVE-2026-106444 Published 6 days ago

47

Medium Risk

This Affects:

JShandlebars
4.0.0 - 4.7.9
Fixed in 4.7.10
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.

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.

Background info

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

How to fix this

Upgrade the handlebars library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform