cve.bz

CVE-2026-33939 handlebarsjs handlebars: Uncaught Exception

7.5 highExploit referenceEPSS 0.6%Fix available

High (7.5) in handlebarsjs handlebars. EPSS 0.6% estimated probability of exploitation activity in the next 30 days. Fixed in handlebars 4.7.9.

On this page
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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 51st percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2026-03-30. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-754 Improper Check for Unusual or Exceptional Conditions
CWE-248 Uncaught Exception
OWASP Top 10
A10:2025 Mishandling of Exceptional Conditions
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-33939 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-33939?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-33939?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-33939 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-33939

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-33939](https://cve.bz/cve/badge/CVE-2026-33939.svg)](https://cve.bz/cve/CVE-2026-33939)

HTML:

<a href="https://cve.bz/cve/CVE-2026-33939"><img src="https://cve.bz/cve/badge/CVE-2026-33939.svg" alt="CVE-2026-33939"></a>

Affected

Versions

From the NVD's CPE matches.

ProductAffected
handlebarsjs:handlebarsfrom 4.0.0 before 4.7.9

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-9cx6-37pm-9jffnpmhandlebars>=4.0.0 <4.7.94.7.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13node-handlebarsno fix listedDEBIAN-CVE-2026-33939
Debian14node-handlebars3:4.7.9-1DEBIAN-CVE-2026-33939
Ubuntu18.04:LTS, 20.04:LTS, 22.04:LTS and 4 morenode-handlebarsno fix listedUBUNTU-CVE-2026-33939

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is an Important denial of service flaw in Handlebars.js affecting applications that compile user-supplied templates without proper error handling. A remote attacker can submit a malformed template containing unregistered decorator syntax, leading to an unhandled `TypeError` and crashing the Node.js process. Red Hat products are vulnerable if they use Handlebars.js in a configuration that allows untrusted input to be compiled at runtime without implementing `try/catch` blocks or input validation.

Red Hat's mitigation

To mitigate this issue, applications utilizing Handlebars.js should implement robust error handling during template compilation and rendering. Specifically, wrap template compilation and rendering calls in `try/catch` blocks to gracefully handle `TypeError` exceptions. Alternatively, validate user-supplied template input to reject decorator syntax (`{{*...}}`) if decorators are not actively used by the application. Employing a pre-compilation workflow, where templates are compiled at build time and only pre-compiled templates are served, can also prevent runtime exploitation. If the application is a service, a restart may be required for changes to take effect.

ProductPackageStateAdvisory
Cluster Observability Operator 1.5.3cluster-observability-operator/logging-console-plugin-pf4-rhel9:1782839279Fixed 2026-07-01RHSA-2026:34342
Cluster Observability Operator 1.5.3cluster-observability-operator/logging-console-plugin-pf5-rhel9:1782840539Fixed 2026-07-01RHSA-2026:34342
Cluster Observability Operator 1.5.3cluster-observability-operator/troubleshooting-panel-console-plugin-pf6-rhel9:1782839996Fixed 2026-07-01RHSA-2026:34342
Red Hat OpenShift Dev Spaces 3.27devspaces/code-rhel9:1776744110Fixed 2026-04-23RHSA-2026:10175
Cryostat 4handlebarsNot affected
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch6-rhel9Will not fix
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-operator-bundleWill not fix
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-proxy-rhel9Will not fix
Logging Subsystem for Red Hat OpenShiftopenshift-logging/elasticsearch-rhel9-operatorWill not fix
Logging Subsystem for Red Hat OpenShiftopenshift-logging/kibana6-rhel8Will not fix
Logging Subsystem for Red Hat OpenShiftopenshift-logging/logging-curator5-rhel9Will not fix
Red Hat Data Grid 8handlebarsNot affected
Red Hat Developer Hub 1rhdh/rhdh-hub-rhel9Not affected
Red Hat Enterprise Linux 10firefoxNot affected
Red Hat Enterprise Linux 10thunderbirdNot affected
Red Hat Enterprise Linux 7firefoxNot affected
Red Hat Enterprise Linux 8389-ds:1.4/389-ds-baseWill not fix
Red Hat Enterprise Linux 8firefoxNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8mozjs60Affected
5 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-33939.

References

Check your stackJSON