Cloudanix VulnDB

GHSA-7rx3-28cr-v5wh

Medium · 4.8

CVSS

4.8

EPSS

—

Published

Mar 29, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A vulnerable template library can let a maliciously crafted template access parts of application data or behavior that should be off limits.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Moderate
Impact
Remote Code Execution
Component
Library
Class
Improper Input Validation
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Handlebars fails to block access to the JavaScript prototype method __lookupSetter__. In applications that compile or render attacker-controlled Handlebars templates, a malicious template can bypass intended prototype method access controls and invoke prototype-level behavior that should be inaccessible. The practical impact depends heavily on what objects are exposed to the template context; it may allow unauthorized object introspection, access to restricted properties or setters, or unexpected side effects during template rendering. This is not a standalone remote code execution issue, but it weakens a security boundary often relied on when rendering semi-trusted or untrusted templates.

Why it matters to the business

Organizations using vulnerable Handlebars versions may have increased risk in products that let users create, edit, import, or submit templates, such as CMS features, email/template builders, workflow tools, reporting systems, or plugin ecosystems. Exploitation could expose sensitive data available in the rendering context or alter application behavior, leading to data leakage, integrity issues, or abuse of user-customizable template features. The issue is medium severity, is not listed in CISA KEV, and has no known mature exploit signal in the supplied intelligence, but it should still be remediated because Handlebars is commonly used transitively across JavaScript applications.

How an attack unfolds

An attacker first needs a path to influence Handlebars template content, such as a user-editable template, imported theme, message template, report definition, or another field that is later compiled and rendered by Handlebars. The attacker crafts a template expression that references __lookupSetter__, taking advantage of the missing blocklist entry to reach prototype-level functionality that Handlebars intended to restrict. When the vulnerable application renders the template with real application data, the expression executes in the rendering context and may expose information, trigger setters, or produce unexpected behavior depending on the objects made available to the template. The attacker then observes rendered output, error responses, logs, or application state changes to determine what was accessible and refine the payload.

How to fix it

Upgrade Handlebars to version 4.7.9 or later. For npm-based projects, update direct dependencies and also resolve transitive vulnerable copies using package manager overrides/resolutions where necessary. Review package-lock.json, yarn.lock, pnpm-lock.yaml, and generated dependency trees to ensure no vulnerable Handlebars version remains bundled. After upgrading, rebuild and redeploy affected applications, front-end bundles, server-side rendering services, template worker containers, and any packaged plugins or themes that vendor Handlebars. As defense in depth, avoid rendering untrusted templates; if user-authored templates are required, isolate rendering, minimize the data passed into template contexts, disable dangerous helpers, and treat template editing as a privileged capability.

How to confirm the fix worked

Confirm the effective installed version is Handlebars 4.7.9 or later by running dependency inspection commands such as npm ls handlebars, yarn why handlebars, or pnpm why handlebars, and by checking lockfiles and built artifacts. Validate that dependency overrides or resolutions apply across all workspaces and packages. In applications that accept user-authored templates, run a regression test that attempts to render a template referencing __lookupSetter__ and confirm it is rejected, blocked, sanitized, or otherwise unable to access prototype methods. Also verify deployed images, serverless packages, static bundles, and CI artifacts were rebuilt after the dependency update rather than only changing source manifests.

Typical attack path

  1. Identify an application feature that accepts or stores Handlebars template syntax.
  2. Submit or modify a template containing Handlebars expressions that reference __lookupSetter__.
  3. Wait for the application to compile and render the malicious template with application-provided context data.
  4. Use the prototype method access gap to inspect or invoke behavior that should have been blocked.
  5. Extract information through rendered output, error messages, or side effects, or use the behavior as part of a larger application-specific attack chain.

How to detect it

Review application logs, template management audit logs, CMS or admin activity logs, API request logs, WAF logs, and stored template repositories for attempts to submit or render Handlebars syntax containing __lookupSetter__. Focus on features that allow users to create templates, themes, reports, notifications, email bodies, page layouts, or workflow definitions. Search for raw, URL-encoded, HTML-encoded, and JSON-escaped forms of the method name. Investigate template rendering errors, unusual Handlebars parse failures, repeated template preview requests, and templates updated shortly before unexpected data exposure or application behavior changes. If suspicious payloads are identified, preserve the submitted template, rendered output, request metadata, user/session identifiers where available, and application error traces for incident review.

  • __lookupSetter__
  • %5F%5FlookupSetter%5F%5F
  • %255F%255FlookupSetter%255F%255F
  • __lookupSetter__
  • \u005f\u005flookupSetter\u005f\u005f
  • {{__lookupSetter__
  • {{ __lookupSetter__
  • lookupSetter
  • Handlebars: Access has been denied to resolve the property

What your security team should do

  • Prioritize patching applications that render user-controlled or tenant/user-editable Handlebars templates.
  • Upgrade handlebars npm package to 4.7.9 or later across direct and transitive dependencies.
  • Use npm audit, yarn audit, pnpm audit, SCA tooling, and lockfile review to identify all vulnerable copies.
  • Search repositories and stored templates for uses of __lookupSetter__ and other prototype-access patterns.
  • Restrict template authoring privileges and avoid compiling templates from untrusted input.
  • Reduce sensitive objects passed into template rendering contexts; pass only the fields required for output.
  • Add application logging around template creation, update, import, and render failures to improve future detection.
  • If suspicious template payloads are found, review rendered outputs, affected accounts, and exposed context data for possible information disclosure.

The record

Handlebars.js has a Prototype Method Access Control Gap via Missing __lookupSetter__ Blocklist Entry

Affected packages

Ecosystem Package Introduced Fixed
npm handlebars 4.6.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
Chainguard wazuh-dashboard 0 4.14.4-r1
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