CVE-2019-20920 Details
Description
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).
A vulnerability allowing arbitrary code execution exists in Handlebars versions prior to 3.0.8 and 4.0.0 through 4.5.2. The issue arises because the lookup helper does not properly validate templates, enabling attackers to submit templates that execute arbitrary JavaScript. This vulnerability can be exploited to run arbitrary code on servers processing Handlebars templates or in the browsers of victims, effectively serving as Cross-Site Scripting (XSS).
Upgrade Handlebars to version 3.0.8, 4.5.3 or later.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Oct 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478 | CVE | Third Party Advisory |
| https://www.npmjs.com/advisories/1316 | CVE | ExploitThird Party Advisory |
| https://www.npmjs.com/advisories/1324 | CVE | Third Party Advisory |
| https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478 | [email protected] | Third Party Advisory |
| https://www.npmjs.com/advisories/1316 | [email protected] | ExploitThird Party Advisory |
| https://www.npmjs.com/advisories/1324 | [email protected] | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-94 | Improper Control of Generation of Code ('Code Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| handlebarsjs handlebars | < 3.0.8 >= 4.0.0, < 4.5.3 |
CPE
Remediation
| |
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Oct 8, 2026 | CVE Modified | CVE |
| Oct 8, 2026 | CVE Modified | [email protected] |
| Oct 8, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Nov 21, 2024 | CVE Modified | CVE |
| May 14, 2024 | CVE Modified | [email protected] |
| Oct 15, 2020 | Reanalysis | [email protected] |
| Oct 9, 2020 | Initial Analysis | [email protected] |