# CVE-2026-33938: Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block

- Priority: **Prioritise**
- Reason: Public exploit (GitHub, Date unknown)
- Next step: Check applicability and the vendor advisory: no fix release is recorded here
- Status: published
- Published: 2026-03-27 · Modified: 2026-09-04
- Aliases: UBUNTU-CVE-2026-33938, DEBIAN-CVE-2026-33938, CGA-2p4h-4q94-xh66, CGA-2xjm-6xg8-25j6, CGA-3m55-88cw-2gf7, CGA-43cf-2cjx-9gh5, CGA-4cph-r7qj-3g43, CGA-5r6g-52ch-jqc6, CGA-5w64-gj8m-fmr5, CGA-6xc4-56wg-v523, CGA-cmvx-fmwm-ffjr, CGA-cwxr-6g2p-c787, CGA-fpgc-f649-4jvx, CGA-hhxv-7f4r-4gc6, CGA-hmqp-89xg-j6vj, CGA-j692-rhqv-78wx, CGA-j7r8-45c8-wj26, CGA-j7wh-m8w4-382p, CGA-mxx9-cj9j-h2g2, CGA-p23x-hf22-3qv8, CGA-pq88-5m7c-4x6g, CGA-qchq-4jx3-gjmc, CGA-vhcr-5vj2-qfxf, CGA-wpmx-4cj6-hxg4, GHSA-3mfm-83xf-c92r, CGA-232c-wm3g-vvvf, CGA-2hc4-23xq-c5cx, CGA-2p3x-55wf-rpv3, CGA-2x7c-p3qx-8vrj, CGA-376m-mrpx-whmr, CGA-3f9r-pqvr-fpr2, CGA-3rhg-264r-7jxq, CGA-3xh2-79xc-ww4m, CGA-4244-7qg2-prxf, CGA-4527-v8mv-99v5, CGA-4579-3275-7gp3, CGA-49fh-7fjh-qf8w, 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-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-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-f3pr-4p6j-2v7h, CGA-f4c5-585g-9x7f, CGA-f4mr-2m3f-94ph, CGA-fhqw-7qfv-558p, CGA-fm55-pq76-m2vq, 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-hj23-2h6r-8f43, CGA-hm47-fmf2-xq68, CGA-hp63-7m4r-3w54, CGA-hwpv-7gvr-rhh2, CGA-j5r6-w2rh-5wv2, CGA-j65j-55qq-j369, 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-pgq5-7r6g-369v, CGA-pjhp-5rqh-chxc, CGA-pqp5-9933-7p3c, CGA-pxv8-4m9g-wrpp, CGA-q6wq-g2r6-mvgm, CGA-q7h5-654j-fq65, CGA-qfvg-pfhr-xrwp, CGA-r27p-jqp7-4fwr, CGA-rm9g-3763-33rw, CGA-rpvr-gwhq-3cxf, CGA-rqr5-wqx4-7fp3, CGA-v5mv-g7jc-8fpp, CGA-vc7f-xgmx-gpcm, CGA-vm54-48hp-c5p3, CGA-vr8f-5q4q-7j63, CGA-w6x5-p62x-55q2, CGA-wpjf-4r35-wjq7, CGA-wvrv-7fh2-q57x, CGA-x44j-35p2-9hh6, CGA-x555-wpxr-gphq, CGA-xw8f-7q29-8h46, CGA-xx56-vhr8-26w9
- Record: https://cvemate.com/vulnerability/CVE-2026-33938 · JSON: https://cvemate.com/vulnerability/CVE-2026-33938/json

## Description

```text
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.
```

## Signals

- CVSS: 8.1 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.788%, percentile 57.556%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (github)

## Affected (first 20 of 78)

- chainguard gitlab-rails-ce-18.1 (Chainguard): \< 18.1.6-r14
- chainguard gitlab-rails-ce-18.10 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.11 (Chainguard): \< 18.11.6-r2
- chainguard gitlab-rails-ce-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.9 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-19.0 (Chainguard): \< 19.0.3-r1
- chainguard gitlab-rails-ce-19.1 (Chainguard): \< 19.1.1-r6
- chainguard gitlab-rails-ce-assets-fips-19.4 (Chainguard): \< 19.4.0-r2
- chainguard gitlab-rails-ce-fips-18.1 (Chainguard): \< 18.1.6-r15
- chainguard gitlab-rails-ce-fips-18.10 (Chainguard): \< 18.10.8-r8
- chainguard gitlab-rails-ce-fips-18.11 (Chainguard): \< 18.11.6-r1
- chainguard gitlab-rails-ce-fips-18.5 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.6 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.7 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.9 (Chainguard): \< 18.9.8-r8
- chainguard gitlab-rails-ce-fips-19.0 (Chainguard): \< 19.0.3-r1

## References

- <https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r>
- <https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2>
- <https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9>
- <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>
- <https://access.redhat.com/errata/RHSA-2026:34342>
- <https://access.redhat.com/errata/RHSA-2026:10175>
- <https://ubuntu.com/security/CVE-2026-33938>
- <https://www.cve.org/CVERecord?id=CVE-2026-33938>
- <https://security-tracker.debian.org/tracker/CVE-2026-33938>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33938.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-33938>
- <https://github.com/handlebars-lang/handlebars.js>

---

Data as of 2026-12-05T08:38:36.627Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
