Skip to main content

Velocity.js CVE-2026-44966

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

Severity by source

NVD PRIMARY
9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.7 HIGH

AV:N/PR:N since a remote unauthenticated attacker supplying template content triggers it, but AC:H because meaningful impact depends on attacker-controlled template surface and an environment gadget; guaranteed impact is integrity/DoS, so C:L.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

7
Analysis Updated
Jul 23, 2026 - 11:38 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 23, 2026 - 11:22 vuln.today
cvss_changed
Severity Changed
Jul 23, 2026 - 11:22 NVD
HIGH CRITICAL
CVSS changed
Jul 23, 2026 - 11:22 NVD
8.3 (HIGH) 9.8 (CRITICAL)
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 the velocityjs npm package (Velocity.js <= 2.1.5) lets an attacker who controls template content poison Object.prototype through the #set directive, enabling denial of service and, depending on server-side gadgets, remote code execution. The flaw stems from unvalidated path-key assignment in /src/compile/set.ts, which writes attacker-supplied keys directly onto the target object. Publicly available exploit code exists (a working PoC is published in the GHSA advisory); there is no evidence of active exploitation, and the EPSS score is very low at 0.08% (23rd percentile).

Technical ContextAI

Velocity.js is a pure-JavaScript reimplementation of the Apache Velocity templating engine, distributed as the npm package velocityjs (pkg:npm/velocityjs) and used to render server-side templates in Node.js applications. The vulnerability is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes, i.e. prototype pollution). When the engine processes a #set directive, it resolves the assignment target and writes with the pattern (baseRef as Record<string, unknown>)[key] = val in set.ts without denylisting or filtering dangerous keys such as __proto__, constructor, or prototype. Because JavaScript property access on __proto__ traverses to the shared Object.prototype, a directive like #set($__proto__.polluted = "hacked") mutates the prototype inherited by every object in the process, corrupting global application state.

RemediationAI

No vendor-released patch identified at time of analysis - the advisory records 'fixed in: None', so a version-based upgrade is not yet available; monitor GHSA-j658-c2gf-x6pq (https://github.com/shepherdwind/velocity.js/security/advisories/GHSA-j658-c2gf-x6pq) and the upstream repo https://github.com/shepherdwind/velocity.js for a fixed release. As the primary compensating control, do not render Velocity templates whose content originates from or can be influenced by untrusted users; treat template bodies as code and pass user input only through the data context object rather than the template string. Where rendering of semi-trusted template input is unavoidable, sanitize or reject #set directives and block the literal keys __proto__, constructor, and prototype before rendering, accepting that this breaks any template legitimately using those names. As process-level hardening, run rendering with a frozen prototype (Object.freeze(Object.prototype)) so pollution attempts throw rather than mutate global state - note this can break libraries that rely on a writable prototype and must be tested. Isolating rendering in a separate process or worker limits the blast radius of a successful DoS/pollution.

CVE-2026-34621 HIGH POC
8.6 Apr 11

Prototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu

CVE-2024-56059 CRITICAL
9.8 Dec 18

Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau

CVE-2020-28271 CRITICAL POC
9.8 Nov 12

Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service

CVE-2023-38894 CRITICAL POC
9.8 Aug 16

A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi

CVE-2024-24292 CRITICAL POC
9.8 Mar 28

A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function

CVE-2023-26121 CRITICAL POC
10.0 Apr 11

All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2024-39011 CRITICAL POC
9.8 Jul 30

Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser

CVE-2024-38988 CRITICAL POC
9.8 Mar 28

alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde

CVE-2025-57347 CRITICAL POC
9.8 Sep 24

A vulnerability exists in the 'dagre-d3-es' Node.js package version 7.0.9, specifically within the 'bk' module's addConf

CVE-2025-57321 CRITICAL POC
9.8 Sep 24

A Prototype Pollution vulnerability in the util-deps.addFileDepend function of magix-combine-ex versions thru 1.2.10 all

CVE-2024-45435 CRITICAL POC
9.8 Aug 29

Chartist 1.x through 1.3.0 allows Prototype Pollution via the extend function. Rated critical severity (CVSS 9.8), this

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