Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 2 fixed, 3 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| handlebars-lang | handlebars.js | 4.0.0 to before 4.7.9 | 4.7.9 | Patch available | CNA |
| — | handlebars (npm) | 4.0.0 to before 4.7.9 | 4.7.9 | Patch available | GHSA-9cx6-37pm-9jff |
- handlebars.js Vendorhandlebars-lang Affected 4.0.0 to before 4.7.9 Fixed in 4.7.9 Patch available CNA
- handlebars (npm) Vendor— Affected 4.0.0 to before 4.7.9 Fixed in 4.7.9 Patch available GHSA-9cx6-37pm-9jff
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:* | 4.0.0 to before 4.7.9 | Vulnerable | handlebars-lang |
- cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:* Versions 4.0.0 to before 4.7.9 Vulnerable ·handlebars-lang
Remediation
- Fix · CNA handlebars.js (handlebars-lang) Fixed in 4.7.9
- Fix · GHSA-9cx6-37pm-9jff handlebars (npm) Fixed in 4.7.9 Advisory →
Red Hat 2 advisories
- RHSA-2026:34342 Released 2026-07-01 · Red Hat rating CriticalCluster Observability Operator 1.5.0
- Cluster Observability Operator 1.5 registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9, registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf5-rhel9, registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf6-rhel9 +9
- RHSA-2026:10175 Released 2026-04-23 · Red Hat rating ImportantRed Hat OpenShift Dev Spaces 3.27.1 Release.
- Red Hat OpenShift Dev Spaces 3.27 registry.redhat.io/devspaces/code-rhel9, registry.redhat.io/devspaces/dashboard-rhel9, registry.redhat.io/devspaces/devspaces-rhel9-operator +8
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Logging Subsystem for Red Hat OpenShift | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
| Red Hat Enterprise Linux 9 | Affected | No fix yet |
| Cluster Observability Operator 1.5 | Fixed | RHSA-2026:34342 |
| Red Hat OpenShift Dev Spaces 3.27 | Fixed | RHSA-2026:10175 |
Not affected: 11 products
- Cluster Observability Operator 1.5
- Cryostat 4
- Red Hat Data Grid 8
- Red Hat Developer Hub 1
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift Dev Spaces 3.27
- Red Hat Process Automation 7
Timeline
- 2026-10-02 Threatist record created from CVE-2026-33939
- 2026-10-03 Alias added: GHSA-9cx6-37pm-9jff
- 2026-10-16 Fix available: Cluster Observability Operator 1.5.3 · Red Hat
- 2026-10-25 EPSS moved to the below the 50th percentile
- 2026-10-27 Affected versions changed · Red Hat
- 2026-10-30 EPSS moved to the 50th–90th percentile
- 2026-11-05 Fix available: Cluster Observability Operator 1.5 · Red Hat
References
Patch 1
More handlebars-lang Handlebars vulnerabilities
- TI-2026-26288 Handlebars.js has JavaScript Injection via AST Type Confusion CVSS 3.1CRITICAL 9.8
- TI-2026-26292 Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options CVSS 3.1HIGH 8.3
- TI-2026-26291 Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial CVSS 3.1HIGH 8.1
- TI-2026-26289 Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block CVSS 3.1HIGH 8.1
- TI-2021-06062 Remote code execution (RCE) in handlebars CVSS 3.1CRITICAL 9.8
- TI-2021-06076 Prototype pollution in handlebars CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-33939 · CVE Program
- CVE-2026-33939 · NVD
- FIRST EPSS
- GHSA-9cx6-37pm-9jff · GitHub Advisory Database · CC BY 4.0
- CVE-2026-33939 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences