CVE-2026-33940
Fixed in a distro release EPSS <1%CVSS 8.1
Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, a crafted object placed in the template context can bypass all conditional guards in `resolvePartial()` and cause `invokePartial()` to return `undefined`. The Handlebars runtime then treats the unresolved partial as a source that needs to be compiled, passing the crafted object to `env.compile()`. Because the object is a valid Handlebars AST containing injected code, the generated JavaScript executes arbitrary commands on the server. The attack requires the adversary to control a value that can be returned by a dynamic partial lookup. Version 4.7.9 fixes the issue. Some workarounds are available. First, use the runtime-only build (`require('handlebars/runtime')`). Without `compile()`, the fallback compilation path in `invokePartial` is unreachable. Second, sanitize context data before rendering: Ensure no value in the context is a non-primitive object that could be passed to a dynamic partial. Third, avoid dynamic partial lookups (`{{> (lookup ...)}}`) when context data is user-controlled.
Products: handlebars-lang handlebars.js, Red Hat Cluster Observability Operator 1.5.0, Red Hat OpenShift Dev Spaces 3.27, Red Hat Cryostat 4, Logging Subsystem for Red Hat OpenShift, Red Hat Data Grid 8, Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat OpenShift AI (RHOAI), Red Hat Process Automation 7
Fixed upstream
| Ecosystem | Package | Fixed in |
|---|---|---|
| npm | handlebars | 4.7.9 |
Distro releases
| Release | Package | Fixed in |
|---|---|---|
| Chainguard | gitlab-rails-ce-18.1 | 18.1.6-r14 |
| Chainguard | gitlab-rails-ce-18.10 | no fix |
| Chainguard | gitlab-rails-ce-18.11 | 18.11.6-r2 |
| Chainguard | gitlab-rails-ce-18.5 | no fix |
| Chainguard | gitlab-rails-ce-18.6 | no fix |
| Chainguard | gitlab-rails-ce-18.7 | no fix |
| Chainguard | gitlab-rails-ce-18.8 | no fix |
| Chainguard | gitlab-rails-ce-18.9 | no fix |
| Chainguard | gitlab-rails-ce-19.0 | 19.0.3-r1 |
| Chainguard | gitlab-rails-ce-19.1 | 19.1.1-r6 |
| Chainguard | gitlab-rails-ce-assets-fips-19.4 | 19.4.0-r2 |
| Chainguard | gitlab-rails-ce-fips-18.1 | 18.1.6-r15 |
| Chainguard | gitlab-rails-ce-fips-18.10 | 18.10.8-r8 |
| Chainguard | gitlab-rails-ce-fips-18.11 | 18.11.6-r1 |
| Chainguard | gitlab-rails-ce-fips-18.5 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.6 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.7 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.8 | no fix |
| Chainguard | gitlab-rails-ce-fips-18.9 | 18.9.8-r8 |
| Chainguard | gitlab-rails-ce-fips-19.0 | 19.0.3-r1 |
| Chainguard | gitlab-rails-ce-fips-19.1 | 19.1.1-r1 |
| Chainguard | jupyter-base-notebook | 7.6.3-r2 |
| Chainguard | kibana-7 | no fix |
| Chainguard | kibana-8.17 | 8.17.10-r15 |
| Chainguard | kibana-8.17-bitnami | 8.17.10-r15 |
| Chainguard | kibana-8.17-iamguarded | 8.17.10-r15 |
| Chainguard | kibana-8.18 | 8.18.8-r11 |
| Chainguard | kibana-8.18-bitnami | 8.18.8-r11 |
| Chainguard | kibana-8.18-iamguarded | 8.18.8-r11 |
| Chainguard | kibana-8.19 | 8.19.13-r5 |
| Chainguard | kibana-8.19-bitnami | 8.19.13-r5 |
| Chainguard | kibana-8.19-iamguarded | 8.19.13-r5 |
| Chainguard | kibana-9.0 | 9.0.8-r16 |
| Chainguard | kibana-9.0-bitnami | 9.0.8-r16 |
| Chainguard | kibana-9.0-iamguarded | 9.0.8-r16 |
| Chainguard | kibana-9.1 | 9.1.10-r9 |
| Chainguard | kibana-9.1-iamguarded | 9.1.10-r9 |
| Chainguard | kibana-9.2 | 9.2.7-r2 |
| Chainguard | kibana-9.2-iamguarded | 9.2.7-r2 |
| Chainguard | kibana-9.3 | 9.3.2-r2 |
| Chainguard | kibana-9.3-iamguarded | 9.3.2-r2 |
| Chainguard | lerna | 9.0.7-r2 |
| Chainguard | nextcloud-server-31 | no fix |
| Chainguard | nextcloud-server-32 | 32.0.12-r1 |
| Chainguard | opensearch-dashboards-2 | 2.19.5-r5 |
| Chainguard | opensearch-dashboards-2-fips | 2.19.5-r4 |
| Chainguard | opensearch-dashboards-3 | 3.5.0-r12 |
| Chainguard | opensearch-dashboards-3-fips | 3.5.0-r9 |
| Chainguard | pelias-api | 7.6.0-r5 |
| Chainguard | prism | 5.14.3-r13 |
| Chainguard | py3.10-jupyterlab | 4.6.1-r1 |
| Chainguard | py3.11-jupyterlab | 4.6.1-r1 |
| Chainguard | py3.12-jupyterlab | 4.6.1-r1 |
| Chainguard | py3.13-jupyterlab | 4.6.1-r1 |
| Chainguard | rancher-api-ui | 1.2.3-r8 |
| Chainguard | tensorflow-cpu-jupyter | 2.21.0-r8 |
| Chainguard | tensorflow-gpu-jupyter | 0 |
| Chainguard | tileserver-gl-fips | 5.5.0-r11 |
| Chainguard | ts-patch | 4.0.1-r0 |
| Chainguard | wazuh-dashboard | 4.14.4-r1 |
| Chainguard | wazuh-dashboard-security-plugin-fips | 4.14.5-r8 |
| Debian 12 | node-handlebars | no fix |
| Debian 13 | node-handlebars | no fix |
| Debian 14 | node-handlebars | 3:4.7.9-1 |
| Ubuntu 18.04 LTS | node-handlebars | no fix |
| Ubuntu 20.04 LTS | node-handlebars | no fix |
| Ubuntu 22.04 LTS | node-handlebars | no fix |
| Ubuntu 24.04 LTS | node-handlebars | no fix |
| Ubuntu 25.10 | node-handlebars | no fix |
| Ubuntu 26.04 LTS | node-handlebars | no fix |
| Ubuntu 26.10 | node-handlebars | no fix |
| Wolfi | jupyter-base-notebook | 7.6.3-r2 |
| Wolfi | lerna | 9.0.7-r2 |
| Wolfi | nextcloud-server-32 | 32.0.12-r1 |
| Wolfi | opensearch-dashboards-3 | 3.5.0-r12 |
| Wolfi | prism | 5.14.3-r13 |
| Wolfi | py3.10-jupyterlab | 4.6.1-r1 |
| Wolfi | py3.11-jupyterlab | 4.6.1-r1 |
| Wolfi | py3.12-jupyterlab | 4.6.1-r1 |
| Wolfi | py3.13-jupyterlab | 4.6.1-r1 |
| Wolfi | rancher-api-ui | 1.2.3-r8 |
| Wolfi | ts-patch | 4.0.1-r0 |