Aller au contenu
8.1 Élevée

CVE-2026-33940 Handlebars provides the power necessary to let users build semantic templates

Description

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.

Produits et versions touchés

Produit Versions touchées Corrigé en
handlebars.js 4.0 4.0.0 → < 4.7.9 4.7.9
Red Hat OpenShift Dev Spaces 3.27 1776744110 premières → < 1776744110 1776744110
Logging Subsystem for Red Hat OpenShift Versions non publiées
Red Hat Enterprise Linux 10 Versions non publiées
Red Hat Enterprise Linux 8 Versions non publiées
Red Hat Enterprise Linux 9 Versions non publiées
Cryostat 4 Versions non publiées
Red Hat Data Grid 8 Versions non publiées
Red Hat Enterprise Linux 7 Versions non publiées
Afficher les 4 autres branches
Produit Versions touchées Corrigé en
Red Hat OpenShift AI (RHOAI) Versions non publiées
Red Hat Process Automation 7 Versions non publiées
Cluster Observability Operator 1.5.0 1782839996 premières → < 1782839996 1782839996
Cluster Observability Operator 1.5.2 1782839996 premières → < 1782839996 1782839996

Références

Chronologie

  1. Publiée
  2. Dernière modification
Les 9 CVE de handlebars.js →
Suivre cette CVE