Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.1, published 4 September 2020.
- Which products and versions are affected?
- Handlebars.js handlebars < 3.0.8, >= 4.0.0 < 4.5.2.
- Is there a fix for This vulnerability?
- No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
- How is This vulnerability attacked?
- It is attacked with local access, in a software library.
- Am I affected?
- Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
Technical details
Handlebars versions prior to 3.0.8 and 4.5.2 are vulnerable to arbitrary code execution (CWE-94) via the 'lookup' helper. The vulnerability stems from insufficient validation of templates, which allows an attacker to bypass the sandbox and access the JavaScript constructor. By submitting a specially crafted template, an attacker can execute arbitrary JavaScript in the context of the server-side process or as a Cross-Site Scripting (XSS) attack in a victim's browser. Exploitation requires the ability to provide or influence the template being rendered. Users should upgrade to version 3.0.8, 4.5.2, or later.
Affected products
- Handlebars.js handlebars < 3.0.8, >= 4.0.0 < 4.5.2
Timeline
- 2020-09-04: advisory: Original advisory published on GitHub/OSV.