~ / search / GHSA-w3w8-37jv-2c58

GHSA-w3w8-37jv-2c58

Cross-Site Scripting in mustache

Source: GitHub Advisory Database (reviewed) High CVE-2015-8862

Packages

EcosystemPackageAffectedFixed in
npm mustache < 2.2.1 2.2.1

Details

As written in the advisory (Markdown source, shown as plain text).

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.

References

External links from the advisory. They lead to third-party sites.