{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2026-33916","id":"CVE-2026-33916","title":"Handlebars.js has Prototype Pollution Leading to XSS through Partial Template Injection","description":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `resolvePartial()` in the Handlebars runtime resolves partial names via a plain property lookup on `options.partials` without guarding against prototype-chain traversal. When `Object.prototype` has been polluted with a string value whose key matches a partial reference in a template, the","descriptionLong":"Handlebars provides the power necessary to let users build semantic templates. In versions 4.0.0 through 4.7.8, `resolvePartial()` in the Handlebars runtime resolves partial names via a plain property lookup on `options.partials` without guarding against prototype-chain traversal. When `Object.prototype` has been polluted with a string value whose key matches a partial reference in a template, the polluted string is used as the partial body and rendered without HTML escaping, resulting in reflected or stored XSS. Version 4.7.9 fixes the issue. Some workarounds are available. Apply `Object.freeze(Object.prototype)` early in application startup to prevent prototype  pollution. Note: this may break other libraries, and/or use the Handlebars runtime-only build (`handlebars/runtime`), which does not compile templates  and reduces the attack surface.","published":"2026-03-27T21:00:48.624Z","updated":"2026-10-28T02:30:51.851454321Z","reserved":"2026-03-24T15:41:47.492Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"github.com"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":4.7,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["handlebars-lang handlebars.js"],"affectedProducts":[{"vendor":"handlebars-lang","product":"handlebars.js","defaultStatus":null,"versions":[{"version":">= 4.0.0, < 4.7.9","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"handlebars","purl":"pkg:npm/handlebars","ranges":[">=4.0.0 <4.7.9"],"fixed":["4.7.9"],"advisory":"GHSA-2qvq-rjwj-gvw9"}],"cwes":["CWE-79","CWE-1321"],"aliases":["GHSA-2qvq-rjwj-gvw9"],"references":[{"url":"https://github.com/handlebars-lang/handlebars.js/security/advisories/GHSA-2qvq-rjwj-gvw9","tags":["x_refsource_CONFIRM","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/handlebars-lang/handlebars.js/commit/68d8df5a88e0a26fe9e6084c5c6aaebe67b07da2","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/handlebars-lang/handlebars.js/releases/tag/v4.7.9","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33916.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33916","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23369","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-23383","tags":["advisory"]},{"url":"https://github.com/handlebars-lang/handlebars.js","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.00286,"epssPercentile":0.21669,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-33916","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33916","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2026-33916","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-2qvq-rjwj-gvw9","ok":true,"note":"GHSA-2qvq-rjwj-gvw9"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-33916","ok":true,"note":"scored 2026-11-20"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}