GitHub Advisoryadvisory · npm
GHSA-9prh-257w-9277 Cross-Site Scripting in handlebars
MEDIUM
Official page ↗
- Aliases
- CVE-2015-8861
- Ecosystem
- npm
- Packages
- handlebars
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2020-06-16
Affected packages
• npm handlebars: < 4.0.0 → fixed in 4.0.0
Description
Versions of `handlebars` prior to 4.0.0 are affected by a cross-site scripting vulnerability when attributes in handlebar templates are not quoted.
Proof of Concept
Template:
``````
Input:
```{ 'foo' : 'test.com onload=alert(1)'}```
Rendered result:
``````
Recommendation
Update to version 4.0.0 or later.
Alternatively, ensure that all attributes in handlebars templates are encapsulated with quotes.
Related
Alias · CVE (1)
- CVE-2015-8861 The handlebars package before 4.0.0 for Node.js allows remote attackers to conduct cross-site scripting (XSS) attacks by leveraging a… vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2015-8861 advisory
- https://github.com/wycats/handlebars.js/pull/1083 web
- https://blog.srcclr.com/handlebars_vulnerability_research_findings web
- https://github.com/advisories/GHSA-9prh-257w-9277 advisory
- https://github.com/wycats/handlebars.js package
- https://www.npmjs.com/advisories/61 web
- https://www.sourceclear.com/blog/handlebars_vulnerability_research_findings web
- https://www.tenable.com/security/tns-2016-18 web
- http://www.openwall.com/lists/oss-security/2016/04/20/11 web
- http://www.securityfocus.com/bid/96434 web