Advisory

GHSA-3cqr-58rm-57f8

Also known as: CVE-2019-20920, SNYK-JS-HANDLEBARS-534478

Summary

Arbitrary Code Execution in Handlebars

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2022-02-10 20:38 UTC
Modified
2026-09-10 03:49 UTC

Affected packages and fixes

handlebars

npm · All systems

Affected

  • introduced 0, fixed 3.0.8 (semver)

Fixed versions

3.0.8

Fix

handlebars

npm · All systems

Affected

  • introduced 4.0.0, fixed 4.5.3 (semver)

Fixed versions

4.5.3

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences