dompurify
Affected
- introduced
0, fixed2.0.3(semver)
Fixed versions
2.0.3
Fix
- Fixed version
2.0.3npm install [email protected]
Advisory
Also known as: CVE-2019-16728
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']
});```Medium Basis: The source's own band: MODERATE
0, fixed 2.0.3 (semver)2.0.3
2.0.3npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0