CVE-2026-106445handlebars-lang handlebars.js
Remote Code Execution in Handlebars.js via Prototype Protection Bypass
Critical 9.2 No auth needed
Follow: this CVE · handlebars-lang · handlebars-lang handlebars.js We alert you by email or Slack (account required).
- Priority
- 70
- CVSS 4.0
- 9.2
- EPSS
- —
- Auth required
- No
- Published
- Oct 6, 2026
- Updated
- Oct 12, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: total
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
Handlebars.js versions 3.0.0 through 4.7.9 contain a vulnerability allowing remote code execution when allowProtoMethodsByDefault is enabled. An attacker controlling a template can access Function.prototype.constructor through a deny-list bypass, enabling arbitrary JavaScript execution with the server application's privileges.
Show the original NVD text
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.
What to do
Patch available · fixed versions: 4.7.10
Update handlebars.js to version 4.7.10 or later, or disable allowProtoMethodsByDefault if not required.
- Apply the vendor's security update for handlebars.js.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | handlebars |
≥ 3.0.0 < 4.7.10 |
4.7.10 |
npm install handlebars@4.7.10 |
Per OSV / GitHub Advisories (GHSA-p8wg-vrv2-v86f). Check the version in your lockfile before upgrading.
Affected products
- handlebars-lang · handlebars.js
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.