Read the docs
TI-2026-26292 Aliases CVE-2026-33941GHSA-xjpj-3mr7-gcpf

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

Priority HIGH 71CWE-116Published · Updated

Key facts

Attack vector
Local
Privileges required
Low
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting, Code execution
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 2 fixed, 4 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79 and CWE-94.

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00296 22nd percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial handlebars.js (handlebars-lang): 4.7.9handlebars (npm): 4.7.9Red Hat: 2 advisoriesRed Hat: 2 fixed, 4 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
handlebars-langhandlebars.js4.0.0 to before 4.7.94.7.9Patch availableCNA
—handlebars (npm)4.0.0 to before 4.7.94.7.9Patch availableGHSA-xjpj-3mr7-gcpf
  • handlebars.js Vendorhandlebars-lang Affected 4.0.0 to before 4.7.9 Fixed in 4.7.9 Patch available CNA
  • handlebars (npm) Vendor— Affected 4.0.0 to before 4.7.9 Fixed in 4.7.9 Patch available GHSA-xjpj-3mr7-gcpf

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:*4.0.0 to before 4.7.9Vulnerablehandlebars-lang
  • cpe:2.3:a:handlebarsjs:handlebars:*:*:*:*:*:node.js:*:* Versions 4.0.0 to before 4.7.9 Vulnerable ·handlebars-lang

Remediation

  • Fix · CNA handlebars.js (handlebars-lang) Fixed in 4.7.9
  • Fix · GHSA-xjpj-3mr7-gcpf handlebars (npm) Fixed in 4.7.9 Advisory →

Red Hat 2 advisories

  • RHSA-2026:34342 Released 2026-07-01 · Red Hat rating Critical
    Cluster Observability Operator 1.5.0
    • Cluster Observability Operator 1.5 registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf4-rhel9, registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf5-rhel9, registry.redhat.io/cluster-observability-operator/distributed-tracing-console-plugin-pf6-rhel9 +9
  • RHSA-2026:10175 Released 2026-04-23 · Red Hat rating Important
    Red Hat OpenShift Dev Spaces 3.27.1 Release.
    • Red Hat OpenShift Dev Spaces 3.27 registry.redhat.io/devspaces/code-rhel9, registry.redhat.io/devspaces/dashboard-rhel9, registry.redhat.io/devspaces/devspaces-rhel9-operator +8

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Logging Subsystem for Red Hat OpenShiftAffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 10AffectedNo fix yet
Red Hat Enterprise Linux 8AffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 9AffectedNo fix yet
Cluster Observability Operator 1.5Fixed RHSA-2026:34342
Red Hat OpenShift Dev Spaces 3.27Fixed RHSA-2026:10175
Not affected: 11 products
  • Cluster Observability Operator 1.5
  • Cryostat 4
  • Red Hat Data Grid 8
  • Red Hat Developer Hub 1
  • 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 OpenShift Dev Spaces 3.27
  • Red Hat Process Automation 7

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-33941
  2. 2026-10-03 Alias added: GHSA-xjpj-3mr7-gcpf
  3. 2026-10-27 Fix available: Cluster Observability Operator 1.5.3 · Red Hat
  4. 2026-11-05 Fix available: Cluster Observability Operator 1.5 · Red Hat

References

  • TI-2026-26288 Handlebars.js has JavaScript Injection via AST Type Confusion CVSS 3.1CRITICAL 9.8
  • TI-2026-26290 Handlebars.js has Denial of Service via Malformed Decorator Syntax in Template Compilation CVSS 3.1HIGH 7.5
  • TI-2026-26291 Handlebars.js has JavaScript Injection via AST Type Confusion when passing an object as dynamic partial CVSS 3.1HIGH 8.1
  • TI-2026-26289 Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block CVSS 3.1HIGH 8.1
  • TI-2021-06062 Remote code execution (RCE) in handlebars CVSS 3.1CRITICAL 9.8
  • TI-2021-06076 Prototype pollution in handlebars CVSS 3.1CRITICAL 9.8
See all 9 →

Sources