CVE-2026-33937
CVE-2026-33937 is a critical-severity vulnerability in Handlebarsjs Handlebars with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-94.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- EPSS exploit prediction: 2% (76th percentile)
- Actively exploited: Not listed in CISA KEV
- EU (EUVD) id: EUVD-2026-16848
- Weakness: CWE-94
- Affected product: Handlebarsjs Handlebars
- Published:
- Last modified:
Description
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 to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling `Handlebars.compile()`; ensure the argument is always a `string`, never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.
Frequently asked questions
- What is CVE-2026-33937?
- 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 to a template string. The `value` field of a `NumberLiteral` AST node is emitted directly into the generated JavaScript without quoting or sanitization. An attacker who can supply a crafted AST to `compile()` can therefore inject and execute arbitrary JavaScript, leading to Remote Code Execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. Validate input type before calling `Handlebars.compile()`; ensure the argument is always a `string`, never a plain object or JSON-deserialized value. Use the Handlebars runtime-only build (`handlebars/runtime`) on the server if templates are pre-compiled at build time; `compile()` will be unavailable.
- How severe is CVE-2026-33937?
- CVE-2026-33937 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2026-33937 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 2% (76th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2026-33937?
- CVE-2026-33937 affects Handlebarsjs Handlebars. See the affected-products list for the exact vulnerable versions.
- How do I fix CVE-2026-33937?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- Does CVE-2026-33937 have an EU (EUVD) identifier?
- Yes. CVE-2026-33937 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2026-16848.
- When was CVE-2026-33937 published?
- CVE-2026-33937 was published on 2026-03-27 and last updated on 2026-07-02.
References
- https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2
- https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9
- https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-2w6w-674q-4c4q
- https://access.redhat.com/errata/RHSA-2026:10175
- https://access.redhat.com/errata/RHSA-2026:34342
- https://access.redhat.com/security/cve/CVE-2026-33937
- https://bugzilla.redhat.com/show_bug.cgi?id=2452523
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33937.json
Affected products (1)
- cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:*
More vulnerabilities in Handlebarsjs Handlebars
- CVE-2026-33941 — High (CVSS 8.2): Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the…
- CVE-2026-33940 — High (CVSS 8.1): Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a…
- CVE-2026-33938 — High (CVSS 8.1): Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the…
- CVE-2019-20920 — High (CVSS 8.1): Handlebars before 3.0.8 and 4.x before 4.5.3 is vulnerable to Arbitrary Code Execution. The lookup helper fails to…
- CVE-2026-33939 — High (CVSS 7.5): Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, when a…
- CVE-2019-20922 — High (CVSS 7.5): Handlebars before 4.4.5 allows Regular Expression Denial of Service (ReDoS) because of eager matching. The parser may…
All CVEs affecting Handlebarsjs Handlebars →
Other CWE-94 (Code Injection) vulnerabilities
- CVE-2026-57624 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Blocksy Companion Pro <= 2.1.46 versions.
- CVE-2026-10134 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 allows an attacker to read every secret available to the Langflow process, read…
- CVE-2026-53576 — Critical (CVSS 10.0): Kestra is an open-source, event-driven orchestration platform. Prior to 1.0.45 and 1.3.21, the authentication filter…
- CVE-2026-10561 — Critical (CVSS 10.0): IBM Langflow OSS 1.0.0 through 1.9.3 has an vulnerability due to an improper isolation of Python execution combined…
- CVE-2026-25470 — Critical (CVSS 10.0): Improper Control of Generation of Code ('Code Injection') vulnerability in ACPT ACPT (Pro) - Custom Post Types Plugin…
- CVE-2026-48836 — Critical (CVSS 10.0): Unauthenticated Remote Code Execution (RCE) in Easy Invoice <= 2.1.19 versions.