CVE-2019-20920 json
Arbitrary Code Execution in Handlebars
published 2020-09-30 6 y ago modified 2026-10-08 31 d ago also GHSA-3cqr-58rm-57f8 , EUVD-2022-0789
- cvss
- 8.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.2%
- EPSS 3.2% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
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).
Patch / fix
- npm handlebars 3.0.8, 4.5.3
- handlebarsjs handlebars 3.0.8, 4.5.3
- node-handlebars Debian 14, Debian 13, Debian 12 3:4.5.3-1
debian advisories DEBIAN-CVE-2019-20920
- rhvm rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-engine rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-web-ui rhev manager 4.4 1.6.5-1.el8ev
- ovirt-engine-setup rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-engine-tools rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-engine-backend rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-engine-restapi rhev manager 4.4 4.4.3.8-0.1.el8ev
- ovirt-engine-dbscripts rhev manager 4.4 4.4.3.8-0.1.el8ev
red hat advisories RHSA-2020:5179
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2019-20920 updated cvss 8.1
nodejs-handlebars: lookup helper fails to properly validate templates allowing for arbitrary JavaScript execution
-
Red Hat OpenShift Service Mesh 1 servicemesh-grafana, servicemesh-grafana-prometheus Red Hat OpenShift Container Platform 3.11 kibana, openshift3/grafana Red Hat OpenShift Container Platform 4 kibana, openshift4/ose-grafanaaffected: no fix planned “Will not fix”
-
Red Hat Quay v3 quay/quay-rhel8 v3.6.0-62fixed: vendor fix RHSA-2021:3917
-
Red Hat OpenShift Container Platform 4.6 openshift4/ose-logging-kibana6 v4.6.0-202106181629.p0.git.40f3e72fixed: vendor fix RHSA-2021:2500
-
Red Hat RHEL-8-RHEV-S-4.4 - Red Hat Virtualization Engine 4.4 ovirt-web-ui 1.6.5-1.el8evfixed: vendor fix RHSA-2020:5179
-
Red Hat RHPAM 7.13.1 asyncfixed: vendor fix RHSA-2023:1334
-
Red Hat OpenShift Service Mesh 1 kiali Red Hat Quay v3 quay/clair-rhel8 v3.6.0-70, quay/quay-builder-rhel8 v3.6.0-44, quay/quay-operator-rhel8 v3.6.0-43, quay/quay-operator-bundle v3.6.0-48, quay/quay-bridge-operator-rhel8 v3.6.0-40, quay/quay-bridge-operator-bundle v3.6.0-35, +3 more Red Hat Advanced Cluster Management for Kubernetes 2 handlebars Red Hat OpenShift Container Platform 4.6 openshift4/ose-logging-fluentd v4.6.0-202106181629.p0.git.40f3e72, openshift4/ose-logging-curator5 v4.6.0-202106181629.p0.git.40f3e72, openshift4/ose-elasticsearch-operator v4.6.0-202106181629.p0.git.c07c7ab, openshift4/ose-logging-elasticsearch6 v4.6.0-202106181629.p0.git.40f3e72, openshift4/ose-cluster-logging-operator v4.6.0-202106181629.p0.git.c7e8377, openshift4/ose-metering-ansible-operator v4.6.0-202106160917.p0.git.d74112d, +1 more Red Hat Virtualization 4 ovirt-engine-ui-extensions Red Hat RHEL-8-RHEV-S-4.4 - Red Hat Virtualization Engine 4.4 rhvm 4.4.3.8-0.1.el8ev, engine-db-query 1.6.2-1.el8ev, ovirt-engine 4.4.3.8-0.1.el8ev, rhvm-branding-rhv 4.4.6-1.el8ev, ovirt-engine-dwh 4.4.3.1-1.el8ev, ovirt-log-collector 4.4.4-1.el8ev, +26 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 31 d ago
Exploit prediction
3.15% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- npmjs.com https://www.npmjs.com/advisories/1316 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L |
| NVD | 2.0 | 6.8 | AV:N/AC:M/Au:N/C:P/I:P/A:P |
| GitHub | 3.1 | 8.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | handlebars | <3.0.8 >=4.0.0, <4.5.3 |
3.0.8 4.5.3 |
Classification
- Weakness
-
- CWE-94 Improper Control of Generation of Code
References
-
github.com
/handlebars-lang/handlebars.js/commit/156061eb7707575293613d7fdf90e2bdaac029ee
web
-
github.com
/handlebars-lang/handlebars.js/commit/d54137810a49939fd2ad01a91a34e182ece4528e
web
-
npmjs.com
/advisories/1316
web, exploit, third-party-advisory
-
npmjs.com
/advisories/1324
web, third-party-advisory
-
snyk.io
/vuln/SNYK-JS-HANDLEBARS-534478
web, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2019-20920
advisory
-
npmjs.com
/package/handlebars
web
Sources
- CVE List CVE-2019-20920
- GitHub Advisory GHSA-3cqr-58rm-57f8
- NVD CVE-2019-20920
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.