handlebars is vulnerable to Cross-Site Scripting (XSS)
47
CVE Score
Medium
Cross-Site Scripting (XSS)
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.
Upgrade the handlebars library to the patch version.
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.
4.0.0 - 4.7.9
Fixed in 4.7.10handlebars is vulnerable to Cross-Site Scripting (XSS) in versions 4.0.0 - 4.7.9.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.