GHSA-442j-39wm-28r2
Low · 3.7CVSS
3.7
EPSS
—
Published
Mar 29, 2026
CISA due date
—
Cloudanix analysis
A widely used template library could let someone with template-editing access see data they should not be able to view.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Handlebars.js versions before 4.7.9 contain a property access validation bypass in the internal container.lookup mechanism. In affected versions, a template that can influence property lookups may bypass intended restrictions around which object properties are accessible during rendering. The practical impact depends on how Handlebars is used: applications that render only trusted, static templates have limited exposure, while applications that allow users, tenants, plugins, CMS content, themes, or integrations to supply or modify templates may allow unauthorized access to object properties made available to the renderer.
Why it matters to the business
The main business risk is unintended exposure of data passed into template rendering, particularly in systems that support user-controlled templates, email templates, document generation, dashboards, CMS themes, or plugin ecosystems. Although the published severity is low and there is no known KEV listing or mature public exploitation indicated, the package is widely used in JavaScript applications, so vulnerable versions may exist transitively in many services and build pipelines.
How an attack unfolds
An attacker first needs a path to control or significantly influence a Handlebars template, helper, partial, theme, or other rendered template content. They then craft template expressions that trigger container.lookup behavior in a way that bypasses Handlebars' property access validation. If the application renders that template with sensitive objects in scope, the attacker may be able to read properties that the application expected Handlebars to block or isolate. The attacker then uses the rendered output, logs, generated documents, emails, previews, or API responses to retrieve unauthorized data. This issue is most relevant where templates are treated as semi-trusted or user-configurable rather than fully trusted application code.
How to fix it
Upgrade Handlebars to a fixed version. For npm, upgrade `handlebars` to version 4.7.9 or later. Regenerate and commit lockfiles after updating, then rebuild and redeploy affected applications. Also review transitive dependencies that bundle or pin Handlebars and update the parent packages where necessary. As defense in depth, do not render untrusted Handlebars templates with sensitive objects in scope; restrict template-authoring privileges; minimize the data passed into templates; use explicit view models instead of rich application objects; disable or strictly review custom helpers that expose broad object access; and treat user-editable templates as code requiring authorization, review, and audit logging.
How to confirm the fix worked
Confirm that all deployed applications, containers, serverless bundles, and build artifacts use `handlebars` 4.7.9 or later. Validate with package-manager inspection such as `npm ls handlebars`, lockfile review, software composition analysis, or SBOM comparison. Search for nested or bundled copies of Handlebars in packaged artifacts. Functionally test user-editable template features to ensure templates cannot access properties outside the intended view model. If template authoring is supported, verify that only authorized users can edit templates and that rendered templates receive minimal, sanitized data objects.
Typical attack path
- Identify an application feature that uses Handlebars templates, such as email templates, CMS pages, document generation, themes, dashboards, or plugin-rendered content.
- Gain the ability to create, edit, import, or influence a Handlebars template, partial, helper, or template-like field.
- Craft template syntax that exercises container.lookup and attempts to access properties that should normally be blocked by Handlebars property access controls.
- Trigger rendering of the malicious template with application data in scope.
- Inspect the rendered output, preview response, generated file, email, or logs for unauthorized property values or sensitive data.
- Iterate on payloads to access additional reachable properties exposed to the rendering context.
How to detect it
There are no universal exploitation indicators for this issue because exploitation is application-specific and depends on whether attackers can control Handlebars templates and what data is rendered. To assess possible prior exploitation, review audit logs for template, theme, email, document, dashboard, CMS, or plugin changes made before the upgrade. Look for newly created or modified templates containing unusual property traversal, helper-heavy expressions, unexpected lookup usage, or attempts to access internal-looking fields. Review application logs for template rendering errors, rejected template syntax, unusually frequent preview/render requests, or access by low-privileged users to template-management endpoints. Examine generated emails, documents, previews, cached rendered content, and application responses for unexpected disclosure of object metadata, internal property names, or sensitive values. Correlate suspicious template edits with authentication logs, administrative actions, source IPs, and subsequent data access.
What your security team should do
- Inventory all applications and packages that include `handlebars`, including transitive npm dependencies and bundled frontend/server artifacts.
- Prioritize upgrades for systems that allow user-controlled or administrator-configurable templates, themes, email templates, CMS content, document generation, or plugin rendering.
- Upgrade `handlebars` to 4.7.9 or later and redeploy affected services.
- Review whether any application renders untrusted templates with sensitive objects in scope; replace rich objects with explicit, minimal view models.
- Audit custom Handlebars helpers, partial loaders, plugin systems, and template import features for excessive object exposure.
- Add dependency scanning or SBOM checks to prevent reintroduction of vulnerable Handlebars versions.
- Review template-edit audit logs for suspicious changes in environments where users can modify templates.
The record
Handlebars.js has a Property Access Validation Bypass in container.lookup
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | handlebars | 4.0.0 | 4.7.9 |
| Chainguard | kibana-8.17 | 0 | 8.17.10-r15 |
| Chainguard | kibana-8.17-bitnami | 0 | 8.17.10-r15 |
| Chainguard | kibana-8.17-iamguarded | 0 | 8.17.10-r15 |
| Chainguard | kibana-8.18 | 0 | 8.18.8-r11 |
| Chainguard | kibana-8.18-bitnami | 0 | 8.18.8-r11 |
| Chainguard | kibana-8.18-iamguarded | 0 | 8.18.8-r11 |
| Chainguard | kibana-8.19 | 0 | 8.19.13-r5 |
| Chainguard | kibana-8.19-bitnami | 0 | 8.19.13-r5 |
| Chainguard | kibana-8.19-iamguarded | 0 | 8.19.13-r5 |
| Chainguard | kibana-9.0 | 0 | 9.0.8-r16 |
| Chainguard | kibana-9.0-bitnami | 0 | 9.0.8-r16 |
| Chainguard | kibana-9.0-iamguarded | 0 | 9.0.8-r16 |
| Chainguard | kibana-9.1 | 0 | 9.1.10-r9 |
| Chainguard | kibana-9.1-iamguarded | 0 | 9.1.10-r9 |
| Chainguard | kibana-9.2 | 0 | 9.2.7-r2 |
| Chainguard | kibana-9.2-iamguarded | 0 | 9.2.7-r2 |
| Chainguard | kibana-9.3 | 0 | 9.3.2-r2 |
| Chainguard | kibana-9.3-iamguarded | 0 | 9.3.2-r2 |
| Chainguard | lerna | 0 | 9.0.7-r2 |
| Chainguard | opensearch-dashboards-2 | 0 | 2.19.5-r5 |
| Chainguard | opensearch-dashboards-2-fips | 0 | 2.19.5-r4 |
| Chainguard | opensearch-dashboards-3 | 0 | 3.5.0-r12 |
| Chainguard | opensearch-dashboards-3-fips | 0 | 3.5.0-r9 |
| Chainguard | pelias-api | 0 | 7.6.0-r5 |
| Chainguard | prism | 0 | 5.14.3-r13 |
| Chainguard | rancher-api-ui | 0 | 1.2.3-r8 |
| Chainguard | tileserver-gl-fips | 0 | 5.5.0-r11 |
| Wolfi | lerna | 0 | 9.0.7-r2 |
| Wolfi | opensearch-dashboards-2 | 0 | 2.19.5-r5 |
| Wolfi | opensearch-dashboards-3 | 0 | 3.5.0-r12 |
| Wolfi | prism | 0 | 5.14.3-r13 |
| Wolfi | rancher-api-ui | 0 | 1.2.3-r8 |
Related vulnerabilities
- GHSA-7rx3-28cr-v5wh Handlebars.js has a Prototype Method Access Control Gap via Missing __lookupSetter__… Also affects handlebars
- CVE-2026-33940 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- CVE-2026-33941 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- CVE-2026-33939 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- CVE-2026-33937 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- CVE-2026-33938 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- CVE-2026-33916 Handlebars provides the power necessary to let users build semantic templates. Also affects handlebars
- GHSA-xjpj-3mr7-gcpf Handlebars.js has JavaScript Injection in CLI Precompiler via Unescaped Names and Options Also affects handlebars