CVE detail
CVE-2026-33940
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a crafted object placed in the template context can bypass all conditional guards in `resolvePartial()` and cause `invokePartial()` to return `undefined`. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to `env.compile()`. Because the object is a valid Handlebars AST containing injected code, the generated JavaScript executes arbitrary commands on the server. The attack requires the adversary to control a value that can be returned by a dynamic partial lookup. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). Without `compile()`, the fallback compilation path in `invokePartial` is unreachable. Second, sanitize context data before rendering: Ensure no value in the context is a non-primitive object that could be passed to a dynamic partial. Third, avoid dynamic partial lookups (`{{> (lookup ...)}}`) when context data is user-controlled.
Buzz score
Why this CVE is surfacing
This all-time snapshot uses the same composite formula as Trending across a 30-year evidence window, rather than a current rolling window.
Buzz score components · mention 23.0 · diversity 18.0 · KEV 0.0 · OTX 0.0 · PoC 0.0
Why it matters now
Mention timeline
- Total mentions
- 0
- within the 30d window
- Peak daily
- 0
- highest bucket
Evidence
Source links by recency
9 source links · newest first
- CVE-2026-33940 Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partialMicrosoft MSRC
Information published.
vendormsrc.microsoft.comApr 15, 2026, 8:39 AM - https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33940.jsonsecurity.access.redhat.com
No excerpt available.
Vendor Advisorysecurity.access.redhat.comMar 27, 2026, 10:16 PM - https://bugzilla.redhat.com/show_bug.cgi?id=2452521bugzilla.redhat.com
No excerpt available.
Exploitbugzilla.redhat.comMar 27, 2026, 10:16 PM - https://access.redhat.com/security/cve/CVE-2026-33940access.redhat.com
No excerpt available.
Vendor Advisoryaccess.redhat.comMar 27, 2026, 10:16 PM - https://access.redhat.com/errata/RHSA-2026:34342access.redhat.com
No excerpt available.
Vendor Advisoryaccess.redhat.comMar 27, 2026, 10:16 PM - https://access.redhat.com/errata/RHSA-2026:10175access.redhat.com
No excerpt available.
Vendor Advisoryaccess.redhat.comMar 27, 2026, 10:16 PM No excerpt available.
Exploitgithub.comMar 27, 2026, 10:16 PMNo excerpt available.
Exploitgithub.comMar 27, 2026, 10:16 PM- https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2github.com
No excerpt available.
Exploitgithub.comMar 27, 2026, 10:16 PM
Exploit code
Public exploit repository references
Public PoC repositories are third-party, potentially unsafe artifacts. Treat their code as untrusted and use it only on authorized systems in an isolated, least-privilege environment. cvebuzz does not execute the code or verify that an exploit works.
0 repository references · best confidence N/A · max 0 stars
Related records
Similar CVEs
6 related CVEs with shared weakness or product evidence
- CVE-2026-33938CVSS 8.1 · High
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the `@partial-block` special variable is stored in the template dat…
- CVE-2026-33937CVSS 9.8 · Critical
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `Handlebars.compile()` accepts a pre-parsed AST object in addition…
- CVE-2026-55771CVSS 8.8 · High
CedarJava is an open source Java implementation of the Cedar policy language, used for fine-grained authorization decisions. In versions prior to 4.9.0, the EntityIdentifier.equal…
- CVE-2026-44728CVSS 8.2 · High
Babel is a compiler for writing next generation JavaScript. From 7.12.0 to before 7.29.4 and 8.0.0-alpha.13, using Babel to compile code that was specifically crafted by an attack…
- CVE-2025-29806CVSS 6.5 · Medium
No cwe for this issue in Microsoft Edge (Chromium-based) allows an unauthorized attacker to execute code over a network.
- CVE-2024-7520CVSS 8.8 · High
A type confusion bug in WebAssembly could be leveraged by an attacker to potentially achieve code execution. This vulnerability affects Firefox < 129, Firefox ESR < 128.1, and Thu…