CVEfocus › CVE database › CVE-2026-33938

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

CVSS 8.1 HighEPSS 1.0% (higher than 61% of CVEs)Published 2026-03-27Updated 2026-09-04Assigner: GitHub_M

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.

CWE-843CWE-917CWE-94

What to do

Fixed builds are available from Debian, npm: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

2Fixed
5Fix pending
3Under investigation
8Will not fix
24Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10node-handlebarsFix pendingUBUNTU-CVE-2026-33938
Ubuntu 26.04node-handlebarsUnder investigationUBUNTU-CVE-2026-33938
Ubuntu 25.10node-handlebarsWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-33938
Ubuntu 24.04node-handlebarsUnder investigationUBUNTU-CVE-2026-33938
Ubuntu 22.04node-handlebarsUnder investigationUBUNTU-CVE-2026-33938
Ubuntu 20.04node-handlebarsFix pendingUBUNTU-CVE-2026-33938
Ubuntu 18.04node-handlebarsFix pendingUBUNTU-CVE-2026-33938
Debian 14node-handlebarsFixed3:4.7.9-1DEBIAN-CVE-2026-33938
Debian 13node-handlebarsFix pendingDEBIAN-CVE-2026-33938
Debian 12node-handlebarsFix pendingDEBIAN-CVE-2026-33938
Red Hat Enterprise Linux 10firefoxNot affected
Red Hat Enterprise Linux 10thunderbirdNot affected
Red Hat Enterprise Linux 9firefoxNot affected
Red Hat Enterprise Linux 9firefox-x11Not affected
Red Hat Enterprise Linux 9thunderbirdNot affected
Red Hat Enterprise Linux 8389-ds-baseWill not fix
Will not fix
Red Hat Enterprise Linux 8389-ds-base-develWill not fix
Will not fix
Red Hat Enterprise Linux 8389-ds-base-legacy-toolsWill not fix
Will not fix
Red Hat Enterprise Linux 8389-ds-base-libsWill not fix
Will not fix
Red Hat Enterprise Linux 8389-ds-base-snmpWill not fix
Will not fix
Red Hat Enterprise Linux 8cockpit-389-dsWill not fix
Will not fix
Red Hat Enterprise Linux 8firefoxNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
Red Hat Enterprise Linux 8mozjs60Not affected
Red Hat Enterprise Linux 8mozjs60-develNot affected
Red Hat Enterprise Linux 8python3-lib389Will not fix
Will not fix
Red Hat Enterprise Linux 8thunderbirdNot affected
Red Hat Enterprise Linux 7firefoxNot affected
npm libraryhandlebarsFixed4.7.9GHSA-3mfm-83xf-c92r

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.