{"id":"CVE-2026-44966","aliases":["EUVD-2026-32007","GHSA-j658-c2gf-x6pq"],"status":"published","title":"Velocity.js: Prototype Pollution in #set path assignment","description":"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.","severity":{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00545,"percentile":0.46067,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-1321"],"published":"2026-05-09T00:40:16Z","modified":"2026-10-28T02:31:00Z","affected":[{"source":"ghsa","ecosystem":"npm","package":"velocityjs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.1.5"}]}]},{"source":"osv","ecosystem":"npm","package":"velocityjs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"2.1.5"}]}]}],"products":[{"vendor":"shepherdwind","product":"velocity.js"}],"references":[{"url":"https://github.com/shepherdwind/velocity.js/security/advisories/GHSA-j658-c2gf-x6pq","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44966","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-j658-c2gf-x6pq"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/44xxx/CVE-2026-44966.json","tags":["advisory"]},{"url":"https://github.com/shepherdwind/velocity.js","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-44966","title":"Velocity.js: Prototype Pollution in #set path assignment","description":"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.","status":"published","published":"2026-05-26T21:21:29.986Z","modified":"2026-06-01T17:08:58.934Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T13:43:00.288193Z"}],"euvd":[{"id":"EUVD-2026-32007","description":"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.","status":"published","published":"2026-05-26T21:21:29Z","modified":"2026-06-01T17:08:58Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-02T18:20:57.828765Z"}],"ghsa":[{"id":"GHSA-j658-c2gf-x6pq","title":"Velocity.js has a Prototype Pollution vulnerability through #set path assignment","description":"### Summary\nA prototype pollution vulnerability was discovered in Velocity.js \u003c= 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\u003cstring, unknown\u003e)[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.","status":"published","published":"2026-05-09T00:40:16Z","modified":"2026-06-08T23:35:06Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:40:21.48274Z"}],"nvd":[{"id":"CVE-2026-44966","description":"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.","status":"published","published":"2026-05-26T22:16:43.293Z","modified":"2026-07-24T12:10:00.21Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T14:12:20.511562Z"}],"osv":[{"id":"CVE-2026-44966","title":"Velocity.js: Prototype Pollution in #set path assignment","description":"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.","status":"published","published":"2026-05-26T21:21:29.986Z","modified":"2026-10-28T02:31:00.744192113Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:45:05.172514Z"},{"id":"GHSA-j658-c2gf-x6pq","title":"Velocity.js has a Prototype Pollution vulnerability through #set path assignment","description":"### Summary\nA prototype pollution vulnerability was discovered in Velocity.js \u003c= 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\u003cstring, unknown\u003e)[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.","status":"published","published":"2026-05-09T00:40:16Z","modified":"2026-06-08T23:45:16.063373921Z","cvss":[{"version":"3.1","score":8.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-1321"],"updated_at":"2026-11-02T15:46:49.977351Z"}]}}
