Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach template-render endpoint
-
DeliverySubmit crafted Velocity template
-
ExploitTraverse $x.constructor.constructor to Function
-
ExecutionCompile attacker string as function
-
PersistInvoke function via #set
-
ImpactExecute shell command in server process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The one hard prerequisite is that the target application must render attacker-controlled Velocity.js template source through velocityjs <= 2.1.6 (e.g., velocity.render() on untrusted input); given that, exploitation needs no authentication, no user interaction, and works against default library behavior (AV:N/AC:L/PR:N/UI:N). The exploit primitive is a property-read chain ($x.constructor.constructor) reaching the Function constructor, so no special engine configuration is required - the vulnerable code path is on by default. What LIMITS exploitation: applications that only render trusted, developer-authored templates are not exploitable, and deployments already on 2.1.7+ are fixed; note that having applied the earlier CVE-2026-44966 fix does NOT limit exposure because that patch only guarded the #set assignment target, not property reads. |
| Impact | This is a genuine high-priority issue rather than a paper-high CVSS. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H, score 9.8) is consistent with the description: any server rendering attacker-controlled templates gets unauthenticated remote code execution with no user interaction. That signal is reinforced by a published, vendor-verified PoC and a clear, deterministic exploit primitive (Function constructor), which typically drives real-world exploitation probability up over time. The key mitigating caveat is the exploitation precondition - the application must actually pass untrusted input into Velocity.js templates; deployments that only render trusted, developer-authored templates are not exposed, so the true blast radius depends on how each app uses the library. No EPSS score and no SSVC decision data were provided in the input, and the CVE is not listed in CISA KEV, so 'automatable/technical impact' framing is inferred from the CVSS vector and PoC rather than confirmed by a scoring authority. Net: treat as urgent for any app rendering user-supplied templates; lower urgency where template sources are fully trusted. |
| Exploit ScenarioDerived | An application exposes a feature that renders user-submitted Velocity templates (e.g., customizable email/notification templates or a reporting layout). An unauthenticated attacker submits a template like '#set($f=$x.constructor.constructor("return process.mainModule.require('child_process').execSync('whoami').toString()"))#set($r=$f())$r', which resolves to the Function constructor and executes a shell command in the server process. A working PoC exists in the GHSA advisory (vendor-verified on v2.1.6, Node.js v24.15.0), and with AV:N/AC:L/PR:N/UI:N the attack is a single unauthenticated request against a vulnerable rendering endpoint. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Remote code execution in Velocity.js (npm 'velocityjs') versions <= 2.1.6 lets an attacker who controls template content reach the JavaScript Function constructor and run arbitrary code in the server process. The earlier CVE-2026-44966/GHSA-j658-c2gf-x6pq fix only filtered constructor/__proto__/prototype in the #set assignment target, leaving property-read expressions in references.ts unguarded, so this is a straightforward bypass. Publicly available exploit code exists (a working PoC is published in the GHSA advisory and was vendor-verified on v2.1.6); no confirmed active exploitation (not in CISA KEV).
RemediationAI
Vendor-released patch: upgrade velocityjs to 2.1.7 or later (npm install velocityjs@^2.1.7 and rebuild/redeploy), which centralizes prototype-key filtering in src/compile/prototype-guard.ts and applies it to both #set targets and property-read expressions; see GHSA-7gfh-x38p-prh3, PR #192, and release v2.1.7. If you cannot upgrade immediately, the highest-value compensating control is to stop rendering attacker-controlled template source entirely - treat templates as trusted code and never build them from user input (side effect: removes any user-templating feature). Where user templating must remain, sandbox rendering in a separate least-privilege worker/process or container with no filesystem, network egress, or cloud-credential access (side effect: added deployment complexity and latency), and/or pre-filter template input to reject references containing 'constructor', '__proto__', or 'prototype' (side effect: fragile blocklisting that can be bypassed and may break legitimate templates). These are stopgaps; upgrading to 2.1.7 is the reliable fix.
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
Velocity.js is a pure-JavaScript reimplementation of the Apache Velocity template engine, commonly embedded in Node.js applications to render VTL templates. The root cause is a classic CWE-94 Code Injection through JavaScript prototype-chain traversal: the getReferences() evaluation path calls getAttributes(), which performs raw property access (baseRef[property.id]) with no key filtering. An attacker-supplied reference such as $x.constructor.constructor walks {} → Object → Function, obtaining the Function constructor, which compiles and executes an arbitrary string as code. Per the CPE/package data the affected component is npm 'velocityjs' <= 2.1.6; the fix in 2.1.7 centralizes filtering in a new src/compile/prototype-guard.ts module (isBlockedPrototypeKey/hasBlockedUnknownPrototypePath) that both set.ts and references.ts now invoke, blocking __proto__ everywhere, prototype on function objects, and constructor/prototype traversal that would fall through to inherited prototype-chain properties.
Know when the next one hits your stack
- 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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Unauthenticated remote code execution via attacker-controlled template with no user interaction yields AV:N/AC:L/PR:N/UI:N and full C:H/I:H/A:H; scope unchanged as code runs in the same server process.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Velocity.js is a JavaScript implementation of the Apache Velocity template engine. Prior to 2.1.7, the earlier fix for CVE-2026-44966 filtered constructor, __proto__, and prototype only in the #set assignment handler in src/compile/set.ts, while property-read expressions in src/compile/references.ts remained unfiltered. The getReferences() flow called getAttributes(), whose property access allowed an attacker-controlled template to traverse constructor.constructor to the JavaScript Function constructor. The #set handler validated only the assignment target and did not inspect the right-hand property-read expression, allowing arbitrary shell commands, environment-variable access, cloud-credential access, and internal-network access in the server process. This issue is fixed in version 2.1.7.
Blast Radius
ecosystem impact- 123 npm packages depend on velocityjs (58 direct, 65 indirect)
Ecosystem-wide dependent count for version 2.1.7.
Articles & Coverage 2
Executive ViewAI
Velocity.js (npm package 'velocityjs') versions 2.1.6 and earlier contain a critical remote code execution vulnerability allowing attackers to execute arbitrary code through malicious template content. Organizations using Velocity.js for server-side template rendering face immediate risk of complete system compromise. No patch is currently available, requiring emergency manual containment measures.
No vendor-released patch identified at time of analysis. Interim mitigations include: restricting template content to trusted internal sources only, disabling user-controlled template input, running template processing in isolated sandboxed environments with minimal privileges, implementing strict access controls on systems accepting template input, and maintaining network segmentation to limit blast radius of any compromise.
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
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
EUVD-2026-58192
GHSA-7gfh-x38p-prh3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB