Skip to content
OpenAdvisories
High · 8.1 CVE-2019-20920 EUVD-2022-0789GHSA-3cqr-58rm-57f8SNYK-JS-HANDLEBARS-534478

Arbitrary Code Execution in Handlebars

Published Sep 30, 2020 · Updated Oct 8, 2026 · Assigned by mitre

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

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-handlebars 3:4.5.3-1 —
Debian 13 node-handlebars 3:4.5.3-1 —
Debian 12 node-handlebars 3:4.5.3-1 —
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS node-handlebars No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Rhev Manager 4 ovirt-web-ui 1.6.5-1.el8ev RHSA-2020:5179
Red Hat Rhev Manager 4 rhvm +19 4.4.3.8-0.1.el8ev RHSA-2020:5179

Affected packages

EcosystemPackageAffectedFixedRecord
npm handlebars < 3.0.8 3.0.8 GHSA-3cqr-58rm-57f8
npm handlebars >= 4.0.0, < 4.5.3 4.5.3 GHSA-3cqr-58rm-57f8

Advisories 1

References