Arbitrary Code Injection Affecting velocityjs package, versions <2.1.7


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-VELOCITYJS-18319515
  • published26 Jul 2026
  • disclosed24 Jul 2026
  • creditcruzryan

Introduced: 24 Jul 2026

New CVE NOT AVAILABLE CWE-94  (opens in a new tab)

How to fix?

Upgrade velocityjs to version 2.1.7 or higher.

Overview

velocityjs is a Velocity Template Language(VTL) for JavaScript

Affected versions of this package are vulnerable to Arbitrary Code Injection via the getAttributes function. An attacker can execute arbitrary code on the server by crafting malicious Velocity templates that access the constructor property, leading to the invocation of the Function constructor with attacker-controlled input.

CVSS Base Scores

version 4.0
version 3.1