Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit attacker-controlled Handlebars template
-
DeliveryTraverse exposed function's prototype to Function.prototype
-
ExploitRead own-property constructor bypassing deny list
-
ExecutionInvoke Function constructor to execute JavaScript
-
ImpactRun arbitrary code with server privileges
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation completeness
|
| Exploitation Conditions | Three specific conditions must all hold: (1) the application must render a template whose content is attacker-controlled; (2) the runtime must be configured with allowProtoMethodsByDefault enabled - this is NOT the default, since Handlebars blocks prototype method access out of the box, so default deployments are not exploitable; and (3) the template context must expose an accessible function value that the attacker can traverse (e.g. via __proto__) to reach Function.prototype and its own 'constructor' property. The non-default configuration flag plus the required in-context function are the key limiting factors (reflected as AT:P in the CVSS 4.0 vector); applications using Handlebars with default options or without attacker-influenced template source are not affected. |
| Impact | This is a server-side remote code execution flaw (CWE-184, incomplete disallowed-input list) in Handlebars, an extremely popular JavaScript templating library, carrying a CVSS 4.0 base score of 9.2 (Critical) with vector AV:N/AC:L/AT:P/PR:N/UI:N and full High confidentiality/integrity/availability impact to the vulnerable system. The single most important modifier is AT:P (Attack Requirements: Present): exploitation is gated on a specific non-default runtime configuration (allowProtoMethodsByDefault enabled), the attacker being able to render a controlled template, AND an accessible function being present in the template context. By default (since the 4.6.x hardening) Handlebars blocks prototype method access, so standard deployments are not exploitable, which sharply narrows real-world risk despite the critical score. No EPSS score, no CISA KEV listing, and no standalone public exploit were supplied in the input, so there is no evidence of active exploitation - treat the 9.2 as worst-case-configuration severity, not a signal of widespread attack. Note the CVSS vendor vector shows PR:N (unauthenticated), yet exploitability is operationally bounded by the required non-default option and context, so AT:P rather than PR is the correct place that conditionality is captured. The input Tag 'Authentication Bypass' is inconsistent with the actual vulnerability class (prototype-chain traversal to the Function constructor yielding RCE) and appears mislabeled. |
| Exploit ScenarioDerived | An application renders Handlebars templates whose content an attacker can influence, runs with allowProtoMethodsByDefault enabled, and exposes a function value in the template context. The attacker submits a template that walks from that function up its prototype to Function.prototype and reads the own-property 'constructor', obtaining the Function constructor to execute arbitrary JavaScript with the server's privileges. No weaponized public exploit is referenced, though the vendor fix commit (spec/security.js) includes a regression test that demonstrates the exact bypass payload. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 06, 2026
Server-side remote code execution affects Handlebars versions 4.0.0 through releases prior to 4.7.10, where a flaw in the lookupProperty prototype-access check lets a rendered template reach Function.prototype.constructor and obtain the JavaScript Function constructor, executing attacker-supplied code with the server application's privileges. Exploitation is conditional: an unauthenticated remote attacker must be able to render a template whose source they control, the runtime must have allowProtoMethodsByDefault enabled (not the default configuration), and the template context must expose an accessible function value that can be traversed via __proto__. No public exploit code was identified at time of analysis and the issue is not confirmed as actively exploited (no CISA KEV listing); vendor-released patch: 4.7.10.
RemediationAI
Upgrade Handlebars to version 4.7.10 (vendor-released patch; fixed via commit ceec388abe1d1aac8f6369860d5f390fa71ef4fa and PR 2185, referenced from the advisory at https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-p8wg-vrv2-v86f and the v4.7.10 release notes). If immediate upgrade is not possible, the most effective compensating control is to ensure allowProtoMethodsByDefault remains disabled (its default value) and that no code path enables it for untrusted input - this single setting removes the necessary precondition for exploitation, at the trade-off that templates legitimately relying on prototype method calls will break. Additionally, never compile or render template source supplied by users or other untrusted parties; any such capability should be removed or moved behind strict allowlisting, since a controlled template is a prerequisite here and a recurring class of template-injection risk. Finally, audit template context data so that arbitrary function values are not exposed to templates that render untrusted content, because an accessible function in context is what allows traversal through __proto__ to Function.prototype; removing such values may require refactoring data passed into render calls.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Handlebars is a widely deployed semantic templating library for JavaScript, commonly used server-side to render pages and HTML. Its security model relies on proto-access-control logic in lib/handlebars/internal/proto-access.js and lib/handlebars/runtime.js, which resolves template property lookups through lookupProperty and applies a prototype-access deny list to block traversal into dangerous built-in objects. The root cause is CWE-184 (incomplete list of disallowed inputs): the check that returned own properties verbatim (Object.prototype.hasOwnProperty.call(parent, propertyName)) treated the 'constructor' property as trusted context data, but 'constructor' is an own property of Function.prototype and points back to the Function constructor itself (Function.prototype.constructor === Function). Because that own-property short-circuit ran before the deny list, a crafted expression such as {{lookup (lookup fn "__proto__") "constructor"}} escaped the prototype restrictions and reached Function, allowing arbitrary JavaScript execution. The upstream fix (commit ceec388, PR 2185) adds an isPrototypeConstructor() guard that re-routes a prototype's own 'constructor' back-reference through the deny list, only treats 'constructor' as a bypass when the resolved value is actually a function whose prototype is the parent, and hardens escapeExpression in lib/handlebars/utils.js so only values whose toHTML is a function are treated as pre-escaped SafeStrings. Note that the accompanying reference tag ('Authentication Bypass') does not match the assessed impact, which is code execution, not authentication bypass.
Know when Node.js gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AC:H because exploitation requires the non-default allowProtoMethodsByDefault option and a function in context; PR:N since the attacker needs no auth; S:U and C/I/A:H for full RCE in the app's own authority.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 138 npm packages depend on handlebars (35 direct, 103 indirect)
Ecosystem-wide dependent count for version 3.0.0.
Articles & Coverage 2
Technical POC Analysis
The bug is in Handlebars lookupProperty.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical remote code execution flaw in Handlebars (versions 4.0.0 through 4.7.9) can let an attacker run arbitrary code with the same privileges as the server application that renders templates. Any business service that renders untrusted or user-supplied template content and has the non-default prototype method setting enabled is exposed to full application compromise, making this a potential path to data theft, lateral movement, and service disruption. Leadership should care because this affects the application tier directly, not just a peripheral component, and remediation requires a dependency upgrade plus verification of template-handling configurations across all affected services.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-93952
GHSA-p8wg-vrv2-v86f
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB