Vulnerability
CVE-2026-33938
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 data context and is reachable and mutable from within a template via helpers that accept arbitrary objects. When a helper overwrites `@partial-block` with a crafted Handlebars AST, a subsequent invocation of `{{> @partial-block}}` compiles and executes that AST, enabling arbitrary JavaScript execution on the server. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). The `compile()` method is absent, eliminating the vulnerable fallback path. Second, audit registered helpers for any that write arbitrary values to context objects. Helpers should treat context data as read-only. Third, avoid registering helpers from third-party packages (such as `handlebars-helpers`) in contexts where templates or context data can be influenced by untrusted input.
125 advisories report this vulnerability, across 6 ecosystems.
Advisories
- CGA-232c-wm3g-vvvf
- CGA-2hc4-23xq-c5cx
- CGA-2p3x-55wf-rpv3
- CGA-2p4h-4q94-xh66
- CGA-2x7c-p3qx-8vrj
- CGA-2xjm-6xg8-25j6
- CGA-376m-mrpx-whmr
- CGA-3f9r-pqvr-fpr2
- CGA-3m55-88cw-2gf7
- CGA-3rhg-264r-7jxq
- CGA-3xh2-79xc-ww4m
- CGA-4244-7qg2-prxf
- CGA-43cf-2cjx-9gh5
- CGA-4527-v8mv-99v5
- CGA-4579-3275-7gp3
- CGA-49fh-7fjh-qf8w
- CGA-4cph-r7qj-3g43
- CGA-4mh4-p5xh-g4gv
- CGA-4pjq-wj5p-f843
- CGA-4q67-xm4p-fwjq
- CGA-4r3v-c398-5j39
- CGA-4x4g-9fh4-22pc
- CGA-4xmm-pgx5-h9qr
- CGA-5r6g-52ch-jqc6
- CGA-5w64-gj8m-fmr5
- CGA-5wv7-j8p5-g65r
- CGA-63p2-98hg-92qh
- CGA-64rj-p8mc-mwrc
- CGA-66jp-p8g2-rh88
- CGA-66vc-w3x9-9g6p
- CGA-69j3-7f83-33jc
- CGA-6f5r-pm6j-2qp5
- CGA-6qvh-9xp4-j37p
- CGA-6xc4-56wg-v523
- CGA-7593-3hcc-fr9q
- CGA-75pq-9r55-8cq4
- CGA-78q3-9vv7-cxq5
- CGA-7q9j-37rc-pq88
- CGA-7qf9-v4qj-wgc7
- CGA-7qjc-wf95-2q9v
- CGA-7rg5-x55v-fwpc
- CGA-82w2-3jq2-qrq9
- CGA-8fgj-g2jp-rwch
- CGA-8hw4-793q-6hvw
- CGA-8pj4-6796-5qfr
- CGA-8qmq-726m-8429
- CGA-8xgp-f88h-4qf2
- CGA-8xw8-7rvf-q8r7
- CGA-92gj-9wh3-m443
- CGA-97q4-39cr-6g7q
- CGA-9859-vfrc-8rm9
- CGA-992v-w8xw-72fq
- CGA-99pp-6xgh-3q8r
- CGA-9cqx-9xj8-gfjh
- CGA-c27f-p5j2-7v7r
- CGA-c28w-889m-3x34
- CGA-c3x5-7974-2j2c
- CGA-c5ph-4992-w8p5
- CGA-c98m-vg8q-cm8g
- CGA-cmvx-fmwm-ffjr
- CGA-cwxr-6g2p-c787
- CGA-f3pr-4p6j-2v7h
- CGA-f4c5-585g-9x7f
- CGA-f4mr-2m3f-94ph
- CGA-fhqw-7qfv-558p
- CGA-fm55-pq76-m2vq
- CGA-fpgc-f649-4jvx
- CGA-gph5-f67g-vwp2
- CGA-gw9m-fpxp-9cpc
- CGA-h229-8r22-p3m4
- CGA-h769-w2jx-7fpv
- CGA-hcgr-2h93-3v6c
- CGA-hfrc-w398-789p
- CGA-hfvq-h9mr-8pp5
- CGA-hg24-j84h-8h57
- CGA-hhxv-7f4r-4gc6
- CGA-hj23-2h6r-8f43
- CGA-hm47-fmf2-xq68
- CGA-hmqp-89xg-j6vj
- CGA-hp63-7m4r-3w54
- CGA-hwpv-7gvr-rhh2
- CGA-j5r6-w2rh-5wv2
- CGA-j65j-55qq-j369
- CGA-j692-rhqv-78wx
- CGA-j7r8-45c8-wj26
- CGA-j7wh-m8w4-382p
- CGA-j9gf-r6cc-4hmw
- CGA-jvx2-46gv-mrq6
- CGA-jwpp-xp2j-gjpj
- CGA-m8hr-g4fp-p73v
- CGA-mj39-5c32-67p5
- CGA-mp2p-rvhm-3378
- CGA-mvvf-45q3-rmf3
- CGA-mxx9-cj9j-h2g2
- CGA-p23x-hf22-3qv8
- CGA-pgq5-7r6g-369v
- CGA-pjhp-5rqh-chxc
- CGA-pq88-5m7c-4x6g
- CGA-pqp5-9933-7p3c
- CGA-pxv8-4m9g-wrpp
Showing the first 100. The API lists them all: /api/v1/vulnerabilities/CVE-2026-33938.
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-3mfm-83xf-c92r
- https://access.redhat.com/errata/RHSA-2026:10175
- https://access.redhat.com/errata/RHSA-2026:34342
- https://access.redhat.com/security/cve/CVE-2026-33938
- https://bugzilla.redhat.com/show_bug.cgi?id=2452525
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33938.json