Description
Handlebars provides the power necessary to let users build semantic templates. From 3.0.0 until 4.7.10, Handlebars lookupProperty returns Function.prototype.constructor before applying the prototype-access deny list because constructor is an own property of Function.prototype. When an attacker can render a controlled template with allowProtoMethodsByDefault enabled and an accessible function in the template context, the template can traverse from that function through its prototype to Function.prototype and then obtain the Function constructor through the own-property bypass. This permits attacker-controlled JavaScript to execute with the server application's privileges. This issue is fixed in version 4.7.10.
Published: 2026-10-06
Score: 9.2 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Apply Patch
AI Analysis

Impact

Handlebars' lookupProperty method, used from version 3.0.0 through 4.7.10, returns Function.prototype.constructor before the prototype‑access deny list is applied, because constructor is an own property of Function.prototype. An attacker who controls a template rendered with allowProtoMethodsByDefault enabled and can provide an accessible function object in the template context can traverse that function’s prototype chain to Function.prototype and obtain the Function constructor via the own‑property bypass. This enables the execution of attacker‑controlled JavaScript with the server application's privileges. The vulnerability has been fixed in version 4.7.10.

Affected Systems

The vulnerability affects all installations of handlebars‑js from version 3.0.0 through 4.7.10. Any environment where user‑supplied templates are rendered with the allowProtoMethodsByDefault option enabled and where a function object is exposed in the template context is at risk. The issue is mitigated in version 4.7.10 and later releases.

Risk and Exploitability

With a CVSS score of 9.2 the vulnerability is classified as critical. The EPSS score of <1% indicates a very low but non‑zero exploitation probability, yet the fact that it is not listed in CISA’s KEV does not diminish the potential for attack in environments that allow dynamic template rendering. The attack requires an attacker to supply a crafted template and control the rendering configuration, making the vector an internal or web‑based template injection scenario. If triggered, it will execute arbitrary JavaScript on the server side.

Generated by OpenCVE AI on October 12, 2026 at 15:30 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Handlebars.js version 4.7.10 or newer, which eliminates the function constructor exposure.
  • Disable the allowProtoMethodsByDefault option in all template rendering contexts to prevent prototype traversal.
  • Remove or sanitize function objects from the template context when allowProtoMethodsByDefault is required, ensuring no function is exposed to the template engine.

Generated by OpenCVE AI on October 12, 2026 at 15:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-p8wg-vrv2-v86f Handlebars: JavaScript Injection via Own Property Check Bypass
History

Mon, 12 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
Description Handlebars provides the power necessary to let users build semantic templates. From 4.0.0 until 4.7.10, Handlebars lookupProperty returns Function.prototype.constructor before applying the prototype-access deny list because constructor is an own property of Function.prototype. When an attacker can render a controlled template with allowProtoMethodsByDefault enabled and an accessible function in the template context, the template can traverse from that function through its prototype to Function.prototype and then obtain the Function constructor through the own-property bypass. This permits attacker-controlled JavaScript to execute with the server application's privileges. This issue is fixed in version 4.7.10. Handlebars provides the power necessary to let users build semantic templates. From 3.0.0 until 4.7.10, Handlebars lookupProperty returns Function.prototype.constructor before applying the prototype-access deny list because constructor is an own property of Function.prototype. When an attacker can render a controlled template with allowProtoMethodsByDefault enabled and an accessible function in the template context, the template can traverse from that function through its prototype to Function.prototype and then obtain the Function constructor through the own-property bypass. This permits attacker-controlled JavaScript to execute with the server application's privileges. This issue is fixed in version 4.7.10.

Sat, 10 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important


Fri, 09 Oct 2026 08:00:00 +0000

Type Values Removed Values Added
First Time appeared Handlebarsjs
Handlebarsjs handlebars
Vendors & Products Handlebarsjs
Handlebarsjs handlebars

Fri, 09 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 06 Oct 2026 20:00:00 +0000

Type Values Removed Values Added
Description Handlebars provides the power necessary to let users build semantic templates. From 4.0.0 until 4.7.10, Handlebars lookupProperty returns Function.prototype.constructor before applying the prototype-access deny list because constructor is an own property of Function.prototype. When an attacker can render a controlled template with allowProtoMethodsByDefault enabled and an accessible function in the template context, the template can traverse from that function through its prototype to Function.prototype and then obtain the Function constructor through the own-property bypass. This permits attacker-controlled JavaScript to execute with the server application's privileges. This issue is fixed in version 4.7.10.
Title Handlebars: JavaScript Injection via Own Property Check Bypass
Weaknesses CWE-1289
CWE-184
References
Metrics cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Handlebarsjs Handlebars
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-12T14:33:33.060Z

Reserved: 2026-10-06T16:49:40.590Z

Link: CVE-2026-106445

cve-icon Vulnrichment

Updated: 2026-10-09T01:43:11.271Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-06T20:17:26.293

Modified: 2026-10-12T15:17:06.910

Link: CVE-2026-106445

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-06T19:39:08Z

Links: CVE-2026-106445 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-12T15:45:13Z

Weaknesses
  • CWE-1289

    Improper Validation of Unsafe Equivalence in Input

  • CWE-184

    Incomplete List of Disallowed Inputs