Skip to main content
EPSS 0.7%top 48%

CVE-2026-73649: CWE-94: Improper Control of Generation of Code ('Code Injection') in shepherdwind velocity.js

0
Critical
VulnerabilityCVE-2026-73649cvecve-2026-73649cwe-94
Published: 08/13/2026 (08/13/2026, 18:05:31 UTC)
Source: CVE Database V5
Vendor/Project: shepherdwind
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

shepherdwind

velocity.js

Affected versions
<2.1.7
shepherdwind/velocity.js
pkg:npm/shepherdwind/velocity.js
Affected versions
<2.1.7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/21/2026, 13:45:27 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses