CVE-2026-33939: Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, when a Handlebars template contains decorator syntax referencing an unregistered decorator (e.g. `{{*n}}`), the compiled template calls `lookupProperty(decorators, "n")`, which returns `undefined`. The runtime then immediately invokes the result as a function, causing an unhandled `TypeError: ... is not a function` that crashes the Node.js process. Any application that compiles user-supplied templates without wrapping the call in a `try/catch` is vulnerable to a single-request Denial of Service. Version 4.7.9 fixes the issue. Some workarounds are available. Wrap compilation and rendering in `try/catch`. Validate template input before passing it to `compile()`; reject templates containing decorator syntax (`{{*...}}`) if decorators are not used in your application. Use the pre-compilation workflow; compile templates at build time and serve only pre-compiled templates; do not call `compile()` at request time.
Security readout for executives and security teams
Plain-English summary
Applications using vulnerable Handlebars.js can be knocked offline if they compile untrusted templates. A malformed decorator reference can trigger an unhandled runtime error and crash the Node.js process. This is availability-only, but it can create business disruption for public services that let users submit or edit templates.
Executive priority
Prioritize remediation for internet-facing or multi-tenant systems that compile customer-controlled templates. Treat as high availability risk, not data theft evidence, based on the current source bundle.
Technical view
Handlebars.js 4.0.0 through 4.7.8 mishandles decorator syntax that references an unregistered decorator. The lookup returns undefined, then the runtime invokes it as a function, causing an unhandled TypeError. Version 4.7.9 fixes the issue. Exposure depends on runtime compilation of user-supplied templates without defensive error handling.
Likely exposure
Highest exposure is in Node.js applications that accept user-supplied Handlebars templates, compile them during requests, and lack try/catch around compile and render paths. Precompiled-only applications are less likely exposed.
Exploitation context
The provided sources do not show active exploitation, and the CVE is not marked KEV. The issue is remotely reachable when an unauthenticated or low-trust user can submit templates to a vulnerable runtime compilation path.
Researcher notes
Key questions are reachability and error containment. Confirm whether user input reaches compile(), whether rendering occurs in the request path, and whether process managers restart crashed workers. Avoid assuming exposure from package presence alone.
Mitigation direction
Upgrade Handlebars.js to version 4.7.9 or later.
Wrap template compilation and rendering in try/catch.
Reject decorator syntax when decorators are not used.
Prefer build-time precompilation over request-time compilation.
Check Red Hat and vendor advisories for packaged dependency status.
Validation and detection
Inventory direct and transitive Handlebars.js versions.
Find endpoints or admin features accepting template input.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-248: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-248 · source CWE mapping
Uncaught Exception
Uncaught Exception represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Improper Check for Unusual or Exceptional Conditions
Improper Check for Unusual or Exceptional Conditions represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.