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
Affected applications can crash when they process a malformed, user-controlled Handlebars template. One request may interrupt the Node.js service, creating an availability risk without exposing or altering data. Risk is concentrated in services compiling untrusted templates during requests.
Executive priority
Prioritize remediation for internet-facing or business-critical services that compile user-controlled templates. Patch promptly and add containment immediately where upgrades require testing. Lower priority is reasonable only after confirming templates are trusted, precompiled, and never compiled from request data.
Technical view
Handlebars.js 4.0.0 through 4.7.8 may retrieve an undefined decorator and invoke it as a function, producing an unhandled TypeError. Applications that compile user-supplied templates without exception handling can suffer process termination. Version 4.7.9 fixes the flaw.
Likely exposure
Exposure requires an affected Handlebars.js version and a path where untrusted template content reaches runtime compilation. Services using only trusted, build-time precompiled templates are less likely to be exposed. Internet-facing template editors, rendering APIs, or similar inputs warrant urgent review.
Exploitation context
The CVSS 3.1 score is 7.5 because exploitation can be remote, unauthenticated, low-complexity, and availability-damaging. The supplied record does not identify confirmed active exploitation, and the CVE is not listed as KEV. Public proof-of-concept status is not established by the bundle.
Researcher notes
The issue maps to CWE-248 and CWE-754: an uncaught exception and inadequate handling of exceptional conditions. Impact described in the bundle is denial of service, not confidentiality or integrity compromise. Validate application-level exception boundaries because package presence alone does not establish reachability.
Mitigation direction
Upgrade Handlebars.js to version 4.7.9 or later.
Wrap template compilation and rendering in exception handling.
Reject decorator syntax when the application does not use decorators.
Prefer build-time precompilation and avoid compiling templates during requests.
Validation and detection
Inventory deployed Handlebars.js versions, including transitive dependencies.
Identify every request path that compiles user-controlled or partially controlled templates.
Verify malformed templates return controlled errors without terminating the Node.js process.
Confirm production deployments use version 4.7.9 or an applicable vendor-provided update.
Review monitoring for TypeError crashes and unexpected Node.js process restarts.
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.