MediumGHSA-9prh-257w-9277CVE-2015-8861
Cross-Site Scripting in handlebars
Published 23 Oct 2018 · Updated 10 Sept 2026
Affected package
handlebarsnpm
- Affected
- <4.0.0
- Fixed in
- 4.0.0
Update to the fixed version for your release line, for example:
npm install handlebars@4.0.0Details
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:
Rendered result:
## Recommendation Update to version 4.0.0 or later. Alternatively, ensure that all attributes in handlebars templates are encapsulated with quotes.
Is GHSA-9prh-257w-9277 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected handlebars, and gives you the command that fixes it.
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2015-8861
- Linkgithub.com/wycats/handlebars.js/pull/1083
- Linkblog.srcclr.com/handlebars_vulnerability_research_findings
- Advisorygithub.com/advisories/GHSA-9prh-257w-9277
- Packagegithub.com/wycats/handlebars.js
- Linkwww.npmjs.com/advisories/61
- Linkwww.sourceclear.com/blog/handlebars_vulnerability_research_findings
- Linkwww.tenable.com/security/tns-2016-18
- Linkwww.openwall.com/lists/oss-security/2016/04/20/11
- Linkwww.securityfocus.com/bid/96434
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.