Zero Day MonitorZDM
DashboardVulnerabilitiesTrendingZero-DaysNews
Login
ImpressumPrivacy Policy
Zero Day Monitor © 2026
2329 articles · 106042 vulns · 38/41 feeds (7d)
← Back to list
9.8
CVE-2026-33937PATCHED
handlebars-lang · handlebars.js

Handlebars.js has JavaScript Injection via AST Type Confusion

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.

Affected Products

VendorProductVersions
handlebars-langhandlebars.js>= 4.0.0, < 4.7.9

References

  • https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-2w6w-674q-4c4q(x_refsource_CONFIRM)
  • https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2(x_refsource_MISC)
  • https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9(x_refsource_MISC)

Related News (3 articles)

Tier A
Microsoft MSRC4h ago
CVE-2026-33937 Handlebars.js has JavaScript Injection via AST Type Confusion
→ No new info (linked only)
Tier C
VulDB3d ago
CVE-2026-33937 | Handlebars up to 4.7.8 AST compile type confusion (GHSA-2w6w-674q-4c4q)
→ No new info (linked only)
Tier C
VulDB3d ago
CVE-2026-33937 | Handlebars up to 4.7.8 AST compile type confusion (GHSA-2w6w-674q-4c4q)
→ No new info (linked only)
CVSS 3.19.8 CRITICAL
VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CISA KEV❌ No
Actively exploited❌ No
Patch availablehandlebars@4.7.9
CWECWE-843, CWE-94
PublishedMar 27, 2026
Tags
GHSA-2w6w-674q-4c4qnpm
Trending Score42
Source articles3
Independent2
Info Completeness0/14
Missing: cve_id, title, description, vendor, product, versions, cvss, epss, cwe, kev, exploit, patch, iocs, mitre_attack

Community Vote

0
Login to vote
0 upvotes0 downvotes
No votes yet

Related CVEs (5)

HIGHCVE-2026-33939EXP
Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation
Trending: 76
CRITICALCVE-2026-33938EXP
Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block
Trending: 61
HIGHCVE-2026-33940
Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial
Trending: 52
MEDIUMCVE-2026-33916
Handlebars.js has Prototype Pollution Leading to XSS through Partial Template Injection
Trending: 42
HIGHCVE-2026-33941
Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options
Trending: 39

Pin to Dashboard

Verification

State: unverified
Confidence: 0%

Vulnerability Timeline

CVE Published
Mar 27, 2026
Discovered by ZDM
Mar 27, 2026
Patch Available
Mar 27, 2026