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

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.79%, higher than 57% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-27T18:20:44.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-3mfm-83xf-c92r
- Weaknesses: CWE-94, CWE-843, CWE-917
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- handlebars-lang handlebars.js: >= 4.0.0, < 4.7.9
- cluster-observability-operator/logging-console-plugin-pf4-rhel9: no versions given (not affected: from 1782839279 before *)
- cluster-observability-operator/logging-console-plugin-pf5-rhel9: no versions given (not affected: from 1782840539 before *)
- cluster-observability-operator/troubleshooting-panel-console-plugin-pf6-rhel9: no versions given (not affected: from 1782839996 before *)
- devspaces/code-rhel9: no versions given (not affected: from 1776744110 before *)
- handlebars: no versions given
- openshift-logging/elasticsearch6-rhel9: no versions given
- openshift-logging/elasticsearch-operator-bundle: no versions given
- openshift-logging/elasticsearch-proxy-rhel9: no versions given
- openshift-logging/elasticsearch-rhel9-operator: no versions given
- openshift-logging/kibana6-rhel8: no versions given
- openshift-logging/logging-curator5-rhel9: no versions given
- rhdh/rhdh-hub-rhel9: no versions given
- firefox: no versions given
- thunderbird: no versions given
- 389-ds:1.4/389-ds-base: no versions given
- grafana: no versions given
- mozjs60: no versions given
- rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9: no versions given
- devspaces/dashboard-rhel9: no versions given
- handlebars (npm): from 4.0.0 before 4.7.9
- handlebarsjs handlebars: from 4.0.0 before 4.7.9

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- redhat-SADP: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-3mfm-83xf-c92r> (exploit, vendor-advisory, web)
- <https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2> (patch, web)
- <https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9> (release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-33938> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2452525> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33938.json>
- <https://access.redhat.com/errata/RHSA-2026:34342> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:10175> (vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-33938> (advisory)
- <https://github.com/handlebars-lang/handlebars.js> (package)

## Sources

- CVE List: [CVE-2026-33938](https://www.cve.org/CVERecord?id=CVE-2026-33938), CVE Terms of Use, modified 2026-09-04
- GitHub Advisory Database: [GHSA-3mfm-83xf-c92r](https://github.com/advisories/GHSA-3mfm-83xf-c92r), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-33938](https://nvd.nist.gov/vuln/detail/CVE-2026-33938), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-33938 · Whole record: https://cve.day/CVE-2026-33938.json · Rebuilt by cve.day 2026-11-25T22:59:17.448Z
