{"id":"CVE-2019-20920","published":"2020-09-30T12:30:56Z","modified":"2026-10-08T21:13:55Z","title":"Handlebars before 3.0.8 and 4.x before 4.5.3 is vulnerable to Arbitrary Code Execution","vendor":null,"product":null,"tier":"tail","description":{"text":"Handlebars before 3.0.8 and 4.x before 4.5.3 is vulnerable to Arbitrary Code Execution. The lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript. This can be used to run arbitrary code on a server processing Handlebars templates or in a victim's browser (effectively serving as XSS).","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.03031,"percentile":0.87807,"provenance":"source"},"cwes":[],"references":[{"url":"https://www.npmjs.com/advisories/1316","tags":["x_refsource_MISC"]},{"url":"https://www.npmjs.com/advisories/1324","tags":["x_refsource_MISC"]},{"url":"https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478","tags":["x_refsource_MISC"]}],"priority":{"score":17.6,"factors":[{"name":"EPSS percentile","points":17.56}]},"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-08T21:08:21.157256Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"handlebars","vulnerableRanges":["<3.0.8",">=4.0.0, <4.5.3"],"patched":["3.0.8","4.5.3"],"from":["GHSA-3cqr-58rm-57f8"],"provenance":"source"}],"summary":{"text":"The flaw is in the lookup helper of Handlebars, the JavaScript templating library, affecting versions before 3.0.8 and 4.x before 4.5.3, where templates are not properly validated. An attacker who can submit a template to a server or application that processes Handlebars templates can execute arbitrary JavaScript, either to run code on that server or in a victim's browser, where it acts as cross-site scripting.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:27:55Z"},"euvd":{"id":"EUVD-2022-0789","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2015-8861","published":"2017-01-23","fixed":"4.0.0","kev":false},{"cve":"CVE-2019-19919","published":"2019-12-20","fixed":"4.3.0","kev":false},{"cve":"CVE-2019-20922","published":"2020-09-30","fixed":"4.4.5","kev":false,"link":{"from":"CVE-2019-20922","to":"CVE-2019-20920","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:handlebars","fromFixed":"4.4.5","toFixed":"4.5.3","daysApart":0}]}},{"cve":"CVE-2019-20920","published":"2020-09-30","fixed":"4.5.3","kev":false},{"cve":"CVE-2021-23369","published":"2021-04-12","fixed":"4.7.7","kev":false,"link":{"from":"CVE-2019-20920","to":"CVE-2021-23369","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:handlebars","fromFixed":"4.5.3","toFixed":"4.7.7","daysApart":194},{"kind":"same-code","provenance":"machine","files":["lib/handlebars/compiler/javascript-compiler.js"],"commits":["https://github.com/handlebars-lang/handlebars.js/commit/156061eb7707575293613d7fdf90e2bdaac029ee","https://github.com/handlebars-lang/handlebars.js/commit/d54137810a49939fd2ad01a91a34e182ece4528e","https://github.com/handlebars-lang/handlebars.js/commit/b6d3de7123eebba603e321f04afdbae608e8fea8","https://github.com/handlebars-lang/handlebars.js/commit/f0589701698268578199be25285b2ebea1c1e427"],"basis":"shared file"}]}},{"cve":"CVE-2021-23383","published":"2021-05-04","fixed":"4.7.7","kev":false,"link":{"from":"CVE-2019-20920","to":"CVE-2021-23383","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:handlebars","fromFixed":"4.5.3","toFixed":"4.7.7","daysApart":216},{"kind":"same-code","provenance":"machine","files":["lib/handlebars/compiler/javascript-compiler.js"],"commits":["https://github.com/handlebars-lang/handlebars.js/commit/156061eb7707575293613d7fdf90e2bdaac029ee","https://github.com/handlebars-lang/handlebars.js/commit/d54137810a49939fd2ad01a91a34e182ece4528e","https://github.com/handlebars-lang/handlebars.js/commit/f0589701698268578199be25285b2ebea1c1e427"],"basis":"shared file"}]}},{"cve":"CVE-2026-33916","published":"2026-03-27","fixed":"4.7.9","kev":false}],"package":"npm:handlebars"}}