Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.6%top 54%

CVE-2026-33939: CWE-754: Improper Check for Unusual or Exceptional Conditions in handlebars-lang handlebars.js

0
High
VulnerabilityCVE-2026-33939cvecve-2026-33939cwe-754
Published: 03/27/2026 (03/27/2026, 21:08:24 UTC)
Source: CVE Database V5
Vendor/Project: handlebars-lang
Product: handlebars.js

Description

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.

CVSS v3.1

Score 7.5high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

handlebars
pkg:npm/handlebars
Affected versions
>=4.0.0 <=4.7.8

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/17/2026, 08:54:08 UTC

Technical Analysis

In Handlebars.js versions 4.0.0 through 4.7.8, when a template includes decorator syntax referencing an unregistered decorator (e.g., {{*n}}), the compiled template calls lookupProperty(decorators, "n"), which returns undefined. The runtime then attempts to invoke this undefined value as a function, causing an unhandled TypeError that crashes the Node.js process. This vulnerability allows an attacker to cause a denial of service by submitting a malicious template that triggers the crash. The issue is fixed in version 4.7.9. Mitigations include wrapping compilation and rendering calls in try/catch blocks, validating templates to reject decorator syntax if decorators are not used, or using a pre-compilation workflow to avoid runtime compilation of user-supplied templates.

Potential Impact

The vulnerability causes a denial of service by crashing the Node.js process when an unregistered decorator is invoked in a template. This impacts availability of applications that compile user-supplied Handlebars templates without proper error handling. There is no impact on confidentiality or integrity reported. The CVSS 3.1 score is 7.5 (High), reflecting network attack vector, low complexity, no privileges required, no user interaction, and impact limited to availability.

Mitigation Recommendations

A fix is available in Handlebars.js version 4.7.9. Users should upgrade to this version to resolve the vulnerability. Until upgrading, applications should wrap template compilation and rendering calls in try/catch blocks to handle potential exceptions. Additionally, validate templates before compilation to reject those containing decorator syntax if decorators are not used. Alternatively, use a pre-compilation workflow to compile templates at build time and serve only pre-compiled templates, avoiding runtime compilation of user-supplied templates.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-24T19:50:52.103Z
Cvss Version
3.1
State
PUBLISHED
Vendor Advisory Urls
[{"url":"https://access.redhat.com/security/cve/CVE-2026-33939","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:10175","vendor":"Red Hat"}]

Threat ID: 69c6f6ca3c064ed76ff81b9f

Added to database: 03/27/2026, 21:29:46 UTC

Last enriched: 07/17/2026, 08:54:08 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 98

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses