# CVE-2026-33937: Handlebars.js has JavaScript Injection via AST Type Confusion - Exploited (CISA KEV): no - Published: 2026-03-27 - CVSS: 9.8 CRITICAL (v3.1) - EPSS: 1.9% (80th percentile) - CWE: CWE-843, CWE-94 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. ## Edge WAF coverage (claimed by vendors, not measured) | Vendor | Status | First rule | Days after publication | |---|---|---|---| | Cloudflare | No public claim | — | — | | AWS | No public claim | — | — | | Microsoft Azure | No public claim | — | — | | Google Cloud | No public claim | — | — | | Fastly | Before feed history | — | — | | F5 | Rule published | 2026-07-07 | 102 | | Akamai | No public source | — | — | | OWASP CRS | No public claim | — | — | ### F5 - 2026-07-07 · new · rule 200204065 > Added: signature 200204065 "Handlebars Remote Code Execution" (Server Side Code Injection, risk High), systems: Node.js. References: CVE-2026-33937. Source: https://docs.cloud.f5.com/docs-v2/platform/changelogs/security-details-changelog "No public claim" means no vendor statement names this CVE; "Before feed history" means the CVE is older than the vendor feed. In both cases generic rules may still block it. HTML: https://cve.vigilbase.com/cve/CVE-2026-33937 · JSON: https://cve.vigilbase.com/api/v1/cves/CVE-2026-33937