Skip to content
Fencer Intel
high 8.3

CVE-2026-33941 json

Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options

published 7mo ago modified 14d ago also GHSA-xjpj-3mr7-gcpf , EUVD-2026-16862

cvss
8.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.3%
EPSS 0.3% chance of exploitation in 30 days, percentile 22%
public exploits
0
none known

Summary

Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, the Handlebars CLI precompiler (`bin/handlebars` / `lib/precompiler.js`) concatenates user-controlled strings — template file names and several CLI options — directly into the JavaScript it emits, without any escaping or sanitization. An attacker who can influence template filenames or CLI arguments can inject arbitrary JavaScript that executes when the generated bundle is loaded in Node.js or a browser. Version 4.7.9 fixes the issue. Some workarounds are available. First, validate all CLI inputs before invoking the precompiler. Reject filenames and option values that contain characters with JavaScript string-escaping significance (`"`, `'`, `;`, etc.). Second, use a fixed, trusted namespace string passed via a configuration file rather than command-line arguments in automated pipelines. Third, run the precompiler in a sandboxed environment (container with no write access to sensitive paths) to limit the impact of successful exploitation. Fourth, audit template filenames in any repository or package that is consumed by an automated build pipeline.

Patch / fix

  • npm handlebars 4.7.9
  • Red Hat Cluster Observability Operator 1.5.0 1782839279, 1782839996, 1782840539
  • Red Hat Red Hat OpenShift Dev Spaces 3.27 1776744110
  • node-handlebars Debian 14 3:4.7.9-1

debian advisories DEBIAN-CVE-2026-33941

Is CVE-2026-33941 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-33941 updated cvss 8.2

handlebars.js: Handlebars: Arbitrary code execution via CLI precompiler input sanitization flaw

  • Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/kibana6-rhel8, openshift-logging/elasticsearch6-rhel9, openshift-logging/logging-curator5-rhel9, openshift-logging/elasticsearch-proxy-rhel9, openshift-logging/elasticsearch-rhel9-operator, openshift-logging/elasticsearch-operator-bundle Red Hat Enterprise Linux 8 389-ds-base, cockpit-389-ds, python3-lib389, 389-ds-base-libs, 389-ds-base-snmp, 389-ds-base-legacy-tools
    affected: workaround, no fix planned “Will not fix”
  • Red Hat Enterprise Linux 9 thunderbird Red Hat Enterprise Linux 10 firefox
    affected: workaround, no fix available
  • Red Hat Cluster Observability Operator 1.5 cluster-observability-operator/logging-console-plugin-pf4-rhel9 1782839279, cluster-observability-operator/logging-console-plugin-pf5-rhel9 1782840539, cluster-observability-operator/troubleshooting-panel-console-plugin-pf6-rhel9 1782839996
    fixed: vendor fix RHSA-2026:34342
  • Red Hat OpenShift Dev Spaces 3.27 devspaces 1776744110
    fixed: vendor fix RHSA-2026:10175
  • Red Hat Cluster Observability Operator 1.5 cluster-observability-operator/perses-rhel9 1782839109, cluster-observability-operator/thanos-rhel9 1782840280, cluster-observability-operator/korrel8r-rhel9 1782839157, cluster-observability-operator/prometheus-rhel9 1782840780, cluster-observability-operator/alertmanager-rhel9 1782840761, cluster-observability-operator/perses-rhel9-operator 1782839191, +16 more
    not affected: vulnerable code not present
  • Red Hat Cryostat 4 handlebars
    not affected: component not present
  • Red Hat Data Grid 8 handlebars
    not affected: vulnerable code cannot be controlled by adversary
  • Red Hat Developer Hub 1 rhdh/rhdh-hub-rhel9
    not affected: component not present
show 3 more
  • Red Hat Enterprise Linux 7 firefox Red Hat Enterprise Linux 8 firefox, grafana, mozjs60, thunderbird, grafana-loki, grafana-mssql, +11 more Red Hat Enterprise Linux 9 firefox, firefox-x11 Red Hat Enterprise Linux 10 thunderbird
    not affected: vulnerable code not in execute path
  • Red Hat OpenShift AI (RHOAI) rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9 Red Hat OpenShift Dev Spaces 3.27 devspaces 1776716842, devspaces 1776717247, devspaces 1776718438, devspaces 1776718450, devspaces 1776718480, devspaces 1776718585, +9 more
    not affected: vulnerable code not present
  • Red Hat Process Automation 7 handlebars
    not affected: component not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
total
Assessed
7mo ago

Exploit prediction

0.30% chance of exploitation in the next 30 days, higher than 22% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • github.com https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-xjpj-3mr7-gcpf referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 8.3 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
CISA ADP 3.1 8.2 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
NVD 3.1 8.2 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
GitHub 3.1 8.2 CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
npm handlebars
>=4.0.0, <4.7.9
4.7.9

Affected products

  • handlebars-lang handlebars.js
  • Red Hat Cluster Observability Operator 1.5.0
  • Red Hat Red Hat OpenShift Dev Spaces 3.27
  • Red Hat Cryostat 4
  • Red Hat Logging Subsystem for Red Hat OpenShift
  • Red Hat Red Hat Data Grid 8
  • Red Hat Red Hat Developer Hub
  • Red Hat Red Hat Enterprise Linux 10
  • Red Hat Red Hat Enterprise Linux 7
  • Red Hat Red Hat Enterprise Linux 8
  • Red Hat Red Hat Enterprise Linux 9
  • Red Hat Red Hat OpenShift AI (RHOAI)
  • Red Hat Red Hat Process Automation 7

Classification

Weakness
  • CWE-79 Improper Neutralization of Input During Web Page Generation
  • CWE-94 Improper Control of Generation of Code
  • CWE-116 Improper Encoding or Escaping of Output

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.