Every CVE Search/ Get API key

CVE-2026-44966

Velocity.js: Prototype Pollution in #set path assignment

8.3 High

Velocity.js is a JavaScript implementation of the Apache Velocity template engine. In 2.1.5 and earlier, a prototype pollution vulnerability was discovered in velocityjs. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
Low

Exploit likelihood

0.55%Up 0.5 points since May 27, 2026
90%50%10%1%

What each source reports

CVE List Score used 8.3

Velocity.js: Prototype Pollution in #set path assignment

Velocity.js is a JavaScript implementation of the Apache Velocity template engine. In 2.1.5 and earlier, a prototype pollution vulnerability was discovered in velocityjs. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Record
CVE-2026-44966
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Weakness
CWE-1321
Updated
2026-11-02
EUVDEUVD-2026-32007 8.3

Velocity.js is a JavaScript implementation of the Apache Velocity template engine. In 2.1.5 and earlier, a prototype pollution vulnerability was discovered in velocityjs. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Record
EUVD-2026-32007
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-j658-c2gf-x6pq 8.3

Velocity.js has a Prototype Pollution vulnerability through #set path assignment

Summary

A prototype pollution vulnerability was discovered in Velocity.js <= 2.1.5. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Details

The root cause is located in the #set path assignment logic within the source code:

  • File: /src/compile/set.ts
  • Issue: The engine accepts arbitrary path keys and performs assignments using the logic (baseRef as Record<string, unknown>)[key] = val.

Because there is no validation or filtering to block sensitive keys such as __proto__, constructor, or prototype, an attacker can traverse the prototype chain and pollute the global Object.prototype.

PoC

const {render} = require('velocityjs');
delete Object.prototype.polluted;
console.log({}.polluted); // ""
render('#set($__proto__.polluted = "hacked")', {});
console.log({}.polluted); // "hacked"
delete Object.prototype.polluted;

Impact

  • Vulnerability Type: Prototype Pollution
  • Who is impacted: Any application that renders Velocity templates where the template content can be influenced or controlled by untrusted users.
  • Severity: High. Prototype pollution can often be used to bypass security controls, cause application crashes (DoS), or be chained with other vulnerabilities to achieve code execution.
Record
GHSA-j658-c2gf-x6pq
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Weakness
CWE-1321
Updated
2026-11-02
NVD 8.3

Velocity.js is a JavaScript implementation of the Apache Velocity template engine. In 2.1.5 and earlier, a prototype pollution vulnerability was discovered in velocityjs. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Record
CVE-2026-44966
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-1321
Updated
2026-11-02
OSV 8.3

Velocity.js: Prototype Pollution in #set path assignment

Velocity.js is a JavaScript implementation of the Apache Velocity template engine. In 2.1.5 and earlier, a prototype pollution vulnerability was discovered in velocityjs. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Record
CVE-2026-44966
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Weakness
CWE-1321
Updated
2026-11-02
OSVGHSA-j658-c2gf-x6pq 8.3

Velocity.js has a Prototype Pollution vulnerability through #set path assignment

Summary

A prototype pollution vulnerability was discovered in Velocity.js <= 2.1.5. This issue occurs during the processing of #set directives in Velocity templates. If an application renders a template controlled by an attacker, it is possible to modify Object.prototype, potentially leading to Denial of Service (DoS) or Remote Code Execution (RCE) depending on the server environment.

Details

The root cause is located in the #set path assignment logic within the source code:

  • File: /src/compile/set.ts
  • Issue: The engine accepts arbitrary path keys and performs assignments using the logic (baseRef as Record<string, unknown>)[key] = val.

Because there is no validation or filtering to block sensitive keys such as __proto__, constructor, or prototype, an attacker can traverse the prototype chain and pollute the global Object.prototype.

PoC

const {render} = require('velocityjs');
delete Object.prototype.polluted;
console.log({}.polluted); // ""
render('#set($__proto__.polluted = "hacked")', {});
console.log({}.polluted); // "hacked"
delete Object.prototype.polluted;

Impact

  • Vulnerability Type: Prototype Pollution
  • Who is impacted: Any application that renders Velocity templates where the template content can be influenced or controlled by untrusted users.
  • Severity: High. Prototype pollution can often be used to bypass security controls, cause application crashes (DoS), or be chained with other vulnerabilities to achieve code execution.
Record
GHSA-j658-c2gf-x6pq
CVSS 3.1
8.3 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
Weakness
CWE-1321
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
velocityjs
npm
through 2.1.5 None known

History

History
RecordedChangedSources
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-44966 is a high vulnerability (CVSS 8.3) in Shepherdwind Velocity.js, published May 9, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.55%, the 45th percentile. No source names a fixed version.

References

MoveEnter Open