Vulnerability
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.
125 advisories report this vulnerability, across 6 ecosystems.
Advisories
- CGA-222p-wj37-5v8h
- CGA-22qg-f499-9xx7
- CGA-2436-xmmv-x7v7
- CGA-2m72-m7r9-mc47
- CGA-2q9j-h83g-3cjm
- CGA-389p-2m8r-qrqm
- CGA-3p46-pxcj-v2hm
- CGA-3rh2-mf4r-464x
- CGA-3v4p-rwph-xgg2
- CGA-3w42-7pwm-xp95
- CGA-465q-m8cq-8w49
- CGA-47h3-jc4j-x4cv
- CGA-4j5f-cwc9-9rgh
- CGA-4rm6-f344-hhgm
- CGA-4rp9-4mg3-588j
- CGA-4w88-8878-g22g
- CGA-4wrq-x992-g93c
- CGA-54qh-rghx-g35f
- CGA-58r5-wqxv-9v77
- CGA-5c4c-2p7g-59fm
- CGA-5mfp-3q9v-m999
- CGA-5r9g-9f82-8px8
- CGA-5x85-6qm9-vwrr
- CGA-6cxh-h988-g384
- CGA-6pvm-qgvr-hc2x
- CGA-6vrq-9c88-jw6q
- CGA-72p2-772x-ghgh
- CGA-73f3-gfgv-hm8m
- CGA-73hp-68m9-3r4w
- CGA-74r3-28hr-5frx
- CGA-7592-mh93-7ph3
- CGA-76gr-53pq-86xf
- CGA-7hpw-2fh9-rvwm
- CGA-7vc7-6gh2-jvcg
- CGA-7vjm-pxm5-pc7p
- CGA-846f-hp4x-h2gc
- CGA-88xc-95gf-c9vx
- CGA-8j8p-mgxm-gr9r
- CGA-8mpp-m43q-44v9
- CGA-8mqj-69jp-w646
- CGA-9558-cwqp-4mc2
- CGA-9737-f465-mvwf
- CGA-982m-v946-gm93
- CGA-98cp-5x9h-hgw5
- CGA-997c-9g4m-jp25
- CGA-9m8v-rc4q-jv2w
- CGA-9mcv-jcwg-p9fm
- CGA-9v3v-v2ww-5jm8
- CGA-c39f-pvp8-v3wx
- CGA-c52x-75cx-5w5q
- CGA-c5qm-523h-5php
- CGA-cfmr-pfmv-696g
- CGA-cph7-43fm-8p84
- CGA-cq79-vg37-gj8x
- CGA-ffrj-r24c-7rfq
- CGA-fx97-6r2v-9c2f
- CGA-g257-29rc-mj3q
- CGA-g8cv-jcrm-f8mq
- CGA-g9qj-gx9v-g92c
- CGA-g9r9-p2fp-57rr
- CGA-gh9x-4fx6-jx7m
- CGA-gm2q-m9j2-55wc
- CGA-gvm7-vc42-6cx2
- CGA-gwpm-9mr9-97f4
- CGA-h285-7x24-4m98
- CGA-h3r4-wvgw-c7h5
- CGA-h89p-g463-pq54
- CGA-h9cf-qq27-mhhf
- CGA-hpfq-5v6h-f642
- CGA-hqx7-qwpr-7f35
- CGA-hrv7-56mp-29gf
- CGA-hwj9-9f3c-j546
- CGA-hwxh-j3mw-f4c7
- CGA-hxgh-xfc8-54m7
- CGA-j3jh-4jmj-3598
- CGA-j3jh-4p78-fmpq
- CGA-j5vh-c76w-36w3
- CGA-j7j4-pqrm-8xpm
- CGA-j92g-j9jh-qmmf
- CGA-jhgm-998c-4q5v
- CGA-jpm4-h8hv-5xg2
- CGA-jwm3-83v9-845p
- CGA-m5v9-6535-5px4
- CGA-m7x6-2q93-8wxh
- CGA-m8gp-jfr2-4hj4
- CGA-m8rm-5mm5-q3fh
- CGA-m9cc-c69r-45h3
- CGA-mh34-x6f7-9x8m
- CGA-mhvr-g383-2q9w
- CGA-mjpm-2wjh-99vm
- CGA-mw8h-4j6p-p88x
- CGA-p4g5-6ccf-h45m
- CGA-pwr2-2q6c-g55c
- CGA-q32c-vvg4-m9j5
- CGA-q3fc-58rc-ph65
- CGA-q74h-6q5g-j3r2
- CGA-q8qf-48rr-3q7p
- CGA-qf3r-vcpm-9w9x
- CGA-qgxx-gh9h-frwp
- CGA-qhg7-7486-rr28
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-33937.
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