Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXczdzgtMzdqdi0yYzU4
Cross-Site Scripting in mustache
Versions of mustache
prior to 2.2.1 are affected by a cross-site scripting vulnerability when attributes in mustache templates are not quoted.
Example
Template:
<a href={{foo}}/>
Input:
{ 'foo' : 'test.com onload=alert(1)'}
Rendered result:
<a href=test.com onload=alert(1)/>
Recommendation
Update to version 2.2.1 or later.
Alternatively, ensure that all attributes in hmustache templates are encapsulated with quotes.
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXczdzgtMzdqdi0yYzU4
Source: GitHub Advisory Database
Origin: Unspecified
Severity: High
Classification: General
Published: about 7 years ago
Updated: almost 2 years ago
CVSS Score: 6.1
CVSS vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS Percentage: 0.00294
EPSS Percentile: 0.68775
Identifiers: GHSA-w3w8-37jv-2c58, CVE-2015-8862
References:
- https://nvd.nist.gov/vuln/detail/CVE-2015-8862
- https://github.com/janl/mustache.js/commit/378bcca8a5cfe4058f294a3dbb78e8755e8e0da5
- https://github.com/advisories/GHSA-w3w8-37jv-2c58
- https://www.npmjs.com/advisories/62
- https://www.tenable.com/security/tns-2016-18
- http://www.openwall.com/lists/oss-security/2016/04/20/11
- http://www.securityfocus.com/bid/96436
Blast Radius: 32.6
Affected Packages
npm:mustache
Dependent packages: 5,281Dependent repositories: 224,460
Downloads: 22,873,464 last month
Affected Version Ranges: < 2.2.1
Fixed in: 2.2.1
All affected versions: 0.4.0, 0.5.2, 0.6.0, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 1.0.0, 1.1.0, 1.2.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0
All unaffected versions: 2.2.1, 2.3.0, 2.3.1, 2.3.2, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.1.0, 3.2.0, 3.2.1, 4.0.0, 4.0.1, 4.1.0, 4.2.0