CVE-2019-20920

nodejs-handlebars: lookup helper fails to properly validate templates allowing for arbitrary JavaScript execution

Published Sep 30, 2020 CVSS 3.1 · 8.1 High EPSS 3.0% KEV · Not listed
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).

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2022-0789 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).
Github GHSA Github GHSA GHSA-3cqr-58rm-57f8 Arbitrary Code Execution in Handlebars
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Oct 8, 2026, 9:13 PM
Reserved
Sep 30, 2020, 12:00 AM
Status
Modified
Published
Sep 30, 2020, 6:15 PM
Modified
Oct 8, 2026, 10:16 PM
Severity
Moderate
Public date
Nov 4, 2019, 12:00 AM