CVE-2026-73649: CWE-94: Improper Control of Generation of Code ('Code Injection') in shepherdwind velocity.js
Velocity.js, a JavaScript implementation of the Apache Velocity template engine, contains a critical code injection vulnerability (CWE-94) prior to version 2.1.7. The vulnerability arises because property-read expressions were not properly filtered, allowing attacker-controlled templates to access the JavaScript Function constructor via constructor.constructor. This flaw enables execution of arbitrary code, including shell commands and access to sensitive environment variables and credentials. The issue is fixed in version 2.1.7.
AI Analysis
Technical Summary
The vulnerability in shepherdwind's velocity.js (CVE-2026-73649) is a code injection flaw due to improper control of code generation. An earlier fix for CVE-2026-44966 filtered certain properties only in the #set assignment handler but did not filter property-read expressions in src/compile/references.ts. The getReferences() function calls getAttributes(), which allows traversal to the JavaScript Function constructor through constructor.constructor. Because the #set handler validated only the assignment target and not the right-hand property-read expression, an attacker-controlled template can execute arbitrary code, including shell commands and access to environment variables, cloud credentials, and internal network resources. This vulnerability is resolved in velocity.js version 2.1.7.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the server running velocity.js, potentially leading to full system compromise, unauthorized access to environment variables, cloud credentials, and internal network resources. The CVSS score of 9.8 reflects the critical severity with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade velocity.js to version 2.1.7 or later, where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Patch status is confirmed by the fixed version 2.1.7.
CVE-2026-73649: CWE-94: Improper Control of Generation of Code ('Code Injection') in shepherdwind velocity.js
Description
Velocity.js, a JavaScript implementation of the Apache Velocity template engine, contains a critical code injection vulnerability (CWE-94) prior to version 2.1.7. The vulnerability arises because property-read expressions were not properly filtered, allowing attacker-controlled templates to access the JavaScript Function constructor via constructor.constructor. This flaw enables execution of arbitrary code, including shell commands and access to sensitive environment variables and credentials. The issue is fixed in version 2.1.7.
CVSS v3.1
Score 9.8critical
Affected software
shepherdwind
velocity.js
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in shepherdwind's velocity.js (CVE-2026-73649) is a code injection flaw due to improper control of code generation. An earlier fix for CVE-2026-44966 filtered certain properties only in the #set assignment handler but did not filter property-read expressions in src/compile/references.ts. The getReferences() function calls getAttributes(), which allows traversal to the JavaScript Function constructor through constructor.constructor. Because the #set handler validated only the assignment target and not the right-hand property-read expression, an attacker-controlled template can execute arbitrary code, including shell commands and access to environment variables, cloud credentials, and internal network resources. This vulnerability is resolved in velocity.js version 2.1.7.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary code on the server running velocity.js, potentially leading to full system compromise, unauthorized access to environment variables, cloud credentials, and internal network resources. The CVSS score of 9.8 reflects the critical severity with high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade velocity.js to version 2.1.7 or later, where this vulnerability is fixed. No other mitigations are indicated by the vendor advisory. Patch status is confirmed by the fixed version 2.1.7.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-13T14:04:09.604Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a7e08efbf8831d5399b79b6
Added to database: 08/13/2026, 18:11:59 UTC
Last enriched: 08/21/2026, 13:45:27 UTC
Last updated: 09/26/2026, 01:47:44 UTC
Views: 74
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.