CVE-2019-20920: Code Injection

Published Nov 4, 2019
·
Updated

A flaw was found in nodejs-handlebars, where affected versions of handlebars are vulnerable to arbitrary code execution. The package lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript into the system. This issue is used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting). The highest threat from this vulnerability is to confidentiality.

Other sources

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).

Versions of handlebars prior to 3.0.8 or 4.5.3 are vulnerable to Arbitrary Code Execution. The package lookup helper fails to properly validate templates, allowing attackers to submit templates that execute arbitrary JavaScript in the system. It can be used to run arbitrary code in a server processing Handlebars templates or on a victim's browser (effectively serving as Cross-Site Scripting).

References:

https://www.npmjs.com/advisories/1316 https://www.npmjs.com/advisories/1324

Red Hat

Affected Software

7 affected componentsFixes available
redhat/ovirt-web-ui<0:1.6.5-1.el8e
0:1.6.5-1.el8e
npm/handlebars>=4.0.0<4.5.3
4.5.3
npm/handlebars<3.0.8
3.0.8
redhat/nodejs-handlebars<4.5.3
4.5.3
redhat/nodejs-handlebars<3.0.8
3.0.8
Handlebarsjs Handlebars Node.js<3.0.8
Handlebarsjs Handlebars Node.js>=4.0.0<4.5.3

Event History

Nov 4, 2019
CVE Published
12:00 AM
Sep 24, 2020
Data Sourced
via Red Hat·07:59 AM
DescriptionSeverityAffected Software
Sep 30, 2020
CVE Published
via MITRE·12:30 PM
Data Sourced
via MITRE·12:30 PM
Description
Feb 10, 2022
Advisory Published
08:38 PM

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2019-20920?

CVE-2019-20920 is a vulnerability in Handlebars that allows arbitrary code execution.

2

What is the severity of CVE-2019-20920?

The severity of CVE-2019-20920 is high with a CVSS score of 8.1.

3

How does CVE-2019-20920 work?

CVE-2019-20920 allows attackers to execute arbitrary JavaScript code by exploiting the improper validation of templates in Handlebars.

4

Which versions of Handlebars are affected by CVE-2019-20920?

Handlebars versions before 3.0.8 and 4.x before 4.5.3 are affected by CVE-2019-20920.

5

How can I fix CVE-2019-20920?

To fix CVE-2019-20920, update to version 4.5.3 if you are using Handlebars 4.x, or update to version 3.0.8 if you are using Handlebars 3.x.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203