Denial of Service Vulnerability in Handlebars by Handlebars.js
CVE-2026-33939
7.5HIGH
What is CVE-2026-33939?
Handlebars.js, a popular templating engine, is affected by a Denial of Service vulnerability due to a handling flaw in the decorator syntax. In versions from 4.0.0 to 4.7.8, templates that contain unregistered decorators can lead to the runtime attempting to invoke an undefined function, resulting in a TypeError that crashes Node.js applications. Developers are advised to mitigate this issue by implementing error handling using try/catch blocks, validating template input to disallow problematic syntax, and adopting a pre-compilation approach to serve only safe, pre-compiled templates.
Affected Version(s)
handlebars.js >= 4.0.0, < 4.7.9
