GHSA-w3w8-37jv-2c58

Suggest an improvement
Source
https://github.com/advisories/GHSA-w3w8-37jv-2c58
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2017/10/GHSA-w3w8-37jv-2c58/GHSA-w3w8-37jv-2c58.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-w3w8-37jv-2c58
Aliases
Published
2017-10-24T18:33:36Z
Modified
2023-11-08T03:58:03.869169Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
Cross-Site Scripting in mustache
Details

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.

Database specific
{
    "nvd_published_at": null,
    "severity": "HIGH",
    "github_reviewed_at": "2020-06-16T21:59:24Z",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-79"
    ]
}
References

Affected packages

npm / mustache

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.2.1