CVE-2019-20920: Handlebars - Template Injection
- Cve: CVE-2019-20920
- Name: Handlebars - Template Injection
- 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).
- Impact: Attackers can execute arbitrary code or scripts, leading to server compromise or cross-site scripting (XSS) attacks.
- Remediation: Update to Handlebars 3.0.8 or later, and 4.5.3 or later.
- Vulnerability type: template_injection
- Vulnerability impact: remote_code_execution, client_script_exec
- Requirement type: user_interaction
- Requirements: Attacker needs to submit malicious templates
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.1
- Cvss vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L
- Epss score: 0.03031
- Epss percentile: 0.87826
- Assignee: [email protected]
- Published at: 2020-09-30T18:15:17Z
- Age in days: 2246
- Modified at: 2026-10-08T22:16:54Z
- Patch available: yes
- Public exploits total: 1
- References total: 3
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2019-20920
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
Cwe
| Id | Name |
|---|---|
| CWE-94 | Improper Control of Generation of Code |
Hackerone
- Reports: 3
- Rank: 2839
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://www.npmjs.com/advisories/1316 | nvd | 2020-09-30 |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://www.npmjs.com/advisories/1316 | Exploit, Third Party Advisory |
| https://snyk.io/vuln/SNYK-JS-HANDLEBARS-534478 | Third Party Advisory |
| https://www.npmjs.com/advisories/1324 | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| handlebarsjs:handlebars | >= 4.0.0, < 4.5.3; < 3.0.8 | no | nvd | /v1/products/handlebarsjs/handlebars |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| handlebars-lang/handlebars.js | commit | yes | /v1/repositories/handlebars-lang/handlebars.js |
Index
- Repositories: 74
- Repositories high signal: 6
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2020-09-30
- Remote: yes
- Hackerone reports: 3
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, exposed hosts