{"id":"CVE-2026-44966","aliases":["CVE-2026-44966","GHSA-j658-c2gf-x6pq"],"related":[],"kind":"vulnerability","state":"published","title":"Velocity.js: Prototype Pollution in #set path assignment","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Velocity.js es una implementación JavaScript del motor de plantillas Apache Velocity. En 2.1.5 y versiones anteriores, se descubrió una vulnerabilidad de contaminación de prototipos en velocityjs. Este problema ocurre durante el procesamiento de las directivas #set en las plantillas Velocity. Si una aplicación renderiza una plantilla controlada por un atacante, es posible modificar Object.prototype, lo que podría llevar a una denegación de servicio (DoS) o a una ejecución remota de código (RCE) dependiendo del entorno del servidor.","source":"nvd"}],"published":"2026-05-09T00:40:16.000Z","modified":"2026-07-24T12:10:00.210Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","score":8.3,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","score":8.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L","score":8.3,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"version":"<= 2.1.5","status":"affected"}],"vendor":"shepherdwind","product":"velocity.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"2.1.5"}],"ecosystem":"npm","package":"velocityjs","purl":"pkg:npm/velocityjs","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.1.5"}],"vendor":"shepherdwind","product":"velocity.js","cpe":"cpe:2.3:a:shepherdwind:velocity.js:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/shepherdwind/velocity.js/security/advisories/GHSA-j658-c2gf-x6pq","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44966","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/shepherdwind/velocity.js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-01T17:04:32.448Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44966","url":"https://www.cve.org/CVERecord?id=CVE-2026-44966","licence":"CVE Terms of Use","modified":"2026-06-01T17:08:58.934Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j658-c2gf-x6pq","url":"https://github.com/advisories/GHSA-j658-c2gf-x6pq","licence":"CC-BY-4.0","modified":"2026-06-08T23:45:16.063Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44966","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44966","licence":"Public domain","modified":"2026-07-24T12:10:00.210Z"}],"updatedAt":"2026-11-25T22:59:22.396Z","epss":{"score":0.00606,"percentile":0.43191,"date":"2026-11-30T12:00:22.000Z"}}