CVE-2019-20920Handlebarsjs Handlebars
High 8.1 No auth needed
Follow: this CVE · Handlebarsjs · Handlebarsjs Handlebars We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 3.1
- 8.1
- EPSS
- 3.0% probability of exploitation in 30 days · percentile 88
- Auth required
- No
- Published
- Sep 30, 2020
- Updated
- Oct 8, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-94
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L
What happens
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).
What to do
- Apply the vendor's security update for Handlebars.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | handlebars |
< 3.0.8 |
3.0.8 |
npm install handlebars@3.0.8 |
| npm | handlebars |
≥ 4.0.0 < 4.5.3 |
4.5.3 |
npm install handlebars@4.5.3 |
Per OSV / GitHub Advisories (GHSA-3cqr-58rm-57f8). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| handlebarsjs | handlebars | < 3.0.8 |
| handlebarsjs | handlebars | ≥ 4.0.0 < 4.5.3 |
Official sources
References
Links published by the sources. Open them with care.
- snyk.io Third Party Advisory
- www.npmjs.com Exploit Third Party Advisory
- www.npmjs.com Third Party Advisory