CVE-2019-20920
Arbitrary Code Execution in Handlebars
Reported by mitre · Published September 30, 2020
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).
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| handlebars | handlebarsjs | 4.5.3, 3.0.8 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| chainguard | gitlab-rails-ce-19.1 | * |
| chainguard | gitlab-rails-ce-19.2 | * |
| chainguard | gitlab-rails-ce-fips-18.3 | * |
| chainguard | gitlab-rails-ce-fips-18.9 | * |
| chainguard | gitlab-rails-ee-17.3 | * |
| chainguard | commercial-gitlab-rails-ee-19.2 | * |
| chainguard | code-server | * |
| chainguard | gitlab-rails-ce-fips-19.3 | * |
| chainguard | gitlab-rails-ee-17.7 | * |
| chainguard | gitlab-rails-ce-18.1 | * |
| chainguard | gitlab-rails-ce-18.6 | * |
| chainguard | gitlab-rails-ce-fips-18.7 | * |
| chainguard | gitlab-rails-ee-17.11 | * |
| chainguard | gitlab-rails-ce-18.10 | * |
| chainguard | gitlab-rails-ce-fips-19.2 | * |
| chainguard | gitlab-rails-ee-17.0 | * |
| chainguard | gitlab-rails-ce-fips-18.6 | * |
| chainguard | gitlab-rails-ce-19.0 | * |
| n/a | n/a | * |
…and 47 more
Timeline
- Sep 30, 2020 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Apr 4, 2022 CVE Updated
- Mar 10, 2026 Security Advisory
- Sep 11, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2019-20920
vulnetix vdb fixes CVE-2019-20920
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2019-20920/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2019-20920 advisory
- https://github.com/handlebars-lang/handlebars.js/commit/d54137810a49939fd2ad01a91a34e182ece4528e patch
- https://www.npmjs.com/package/handlebars url
- https://github.com/advisories/GHSA-3cqr-58rm-57f8 advisory