Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWNocWotajRmaC1ydzdt
Cross-Site Scripting in dompurify
Versions of dompurify
prior to 2.0.3 are vulnerable to Cross-Site Scripting (XSS). The package has an XSS filter bypass due to Mutation XSS in both Chrome and Safari through a combination of <svg>
/<math>
elements and </p>
/</br>
. An example payload is: <svg></p><style><a id="</style><img src=1 onerror=alert(1)>">
. This allows attackers to bypass the XSS protection and execute arbitrary JavaScript in a victim's browser.
Recommendation
Upgrade to version 2.0.3 or later. You may also disallow <svg>
and <math>
through dompurify
configurations:
FORBID_TAGS: ['svg', 'math']
});```
Permalink: https://github.com/advisories/GHSA-chqj-j4fh-rw7mJSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLWNocWotajRmaC1ydzdt
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 4 years ago
Updated: over 1 year ago
CVSS Score: 6.1
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS Percentage: 0.00167
EPSS Percentile: 0.53871
Identifiers: GHSA-chqj-j4fh-rw7m, CVE-2019-16728
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-16728
- https://research.securitum.com/dompurify-bypass-using-mxss/
- https://www.npmjs.com/advisories/1205
- https://lists.debian.org/debian-lts-announce/2020/10/msg00029.html
- https://github.com/advisories/GHSA-chqj-j4fh-rw7m
Affected Packages
npm:dompurify
Dependent packages: 1,705Dependent repositories: 56,633
Downloads: 23,841,503 last month
Affected Version Ranges: < 2.0.3
Fixed in: 2.0.3
All affected versions: 0.4.0, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.8.7, 0.8.8, 0.8.9, 0.9.0, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 2.0.0, 2.0.1, 2.0.2
All unaffected versions: 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.0.15, 2.0.16, 2.0.17, 2.1.0, 2.1.1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8, 2.2.9, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.3.10, 2.3.11, 2.3.12, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8, 2.4.9, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.5, 2.5.6, 2.5.7, 2.5.8, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.2.0, 3.2.1, 3.2.2, 3.2.3