{"id":"GHSA-j658-c2gf-x6pq","revision":"6ec180ca56104d0f8b77e92675650d40","records":[{"revision":"6ec180ca56104d0f8b77e92675650d40","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-j658-c2gf-x6pq","aliases":["CVE-2026-44966"],"title":"Velocity.js has a Prototype Pollution vulnerability through #set path assignment","description":"### Summary\nA 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.\n\n### Details\nThe root cause is located in the #set path assignment logic within the source code:\n- File: /src/compile/set.ts \n- Issue: The engine accepts arbitrary path keys and performs assignments using the logic `(baseRef as Record<string, unknown>)[key] = val`.\n\n\nBecause 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.\n\n### PoC\n```javascript\nconst {render} = require('velocityjs');\ndelete Object.prototype.polluted;\nconsole.log({}.polluted); // \"\"\nrender('#set($__proto__.polluted = \"hacked\")', {});\nconsole.log({}.polluted); // \"hacked\"\ndelete Object.prototype.polluted;\n```\n\n### Impact\n- Vulnerability Type: Prototype Pollution\n- Who is impacted: Any application that renders Velocity templates where the template content can be influenced or controlled by untrusted users.\n- 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.","state":0,"publishedAt":"2026-05-09T00:40:16+00:00","modifiedAt":"2026-06-08T23:45:16.0633739+00:00","affected":[{"ecosystem":"npm","name":"velocityjs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"last_affected","version":"2.1.5"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/shepherdwind/velocity.js/security/advisories/GHSA-j658-c2gf-x6pq","https://nvd.nist.gov/vuln/detail/CVE-2026-44966","https://github.com/shepherdwind/velocity.js"],"sourceUrl":"https://github.com/advisories/GHSA-j658-c2gf-x6pq","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-j658-c2gf-x6pq","identifiers":["GHSA-j658-c2gf-x6pq","CVE-2026-44966"]},"retained":false,"historicalAffected":[]}],"coverage":[]}