Skip to main content

Velocity.js CVE-2026-44966

HIGH
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-05-09 https://github.com/shepherdwind/velocity.js GHSA-j658-c2gf-x6pq
8.3
CVSS 3.1
Share

CVSS VectorNVD

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

Lifecycle Timeline

3
Source Code Evidence Fetched
May 09, 2026 - 01:16 vuln.today
Analysis Generated
May 09, 2026 - 01:16 vuln.today
CVE Published
May 09, 2026 - 00:40 nvd
HIGH 8.3

DescriptionNVD

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

javascript
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.

AnalysisAI

Prototype pollution in Velocity.js npm package versions <=2.1.5 allows remote attackers to modify Object.prototype through malicious #set directives in templates, enabling denial of service or potential remote code execution when template content is attacker-controlled. Publicly available exploit code exists. …

Sign in for full analysis, threat intelligence, and remediation guidance.

RemediationAI

Within 24 hours: Identify all applications and dependencies using Velocity.js <=2.1.5 via npm audit and Software Composition Analysis (SCA) tools; document affected systems and their exposure to untrusted template input. Within 7 days: Implement input validation and sandboxing controls (see compensating controls); restrict template processing to trusted sources only; test mitigations in non-production environments. …

Sign in for detailed remediation steps.

Share

CVE-2026-44966 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy