نسخههای متأثر
npmdompurify
- نسخههای متأثر
- < 2.0.3
- نسخهٔ اصلاحشده
- 2.0.3
بهرهبرداری
شرح آسیبپذیری
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']
});```
پیوندها
- https://github.com/advisories/GHSA-chqj-j4fh-rw7m
- https://lists.debian.org/debian-lts-announce/2020/10/msg00029.html
- https://nvd.nist.gov/vuln/detail/CVE-2019-16728
- https://research.securitum.com/dompurify-bypass-using-mxss
- https://research.securitum.com/dompurify-bypass-using-mxss/
- https://www.npmjs.com/advisories/1205

