MEDIUM6.1
GHSA-63q7-h895-m982
Cross-site Scripting in dompurify
Quick fix
GHSA-63q7-h895-m982 — dompurify: upgrade to the fixed version with the command below.
npm install dompurify@2.0.17Details
Cure53 DOMPurify before 2.0.17 allows mutation XSS. This occurs because a serialize-parse roundtrip does not necessarily return the original DOM tree, and a namespace can change from HTML to MathML, as demonstrated by nesting of FORM elements.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-26870[ADVISORY]
- https://github.com/cure53/DOMPurify/commit/02724b8eb048dd219d6725b05c3000936f11d62d[WEB]
- https://github.com/cure53/DOMPurify[PACKAGE]
- https://github.com/cure53/DOMPurify/compare/2.0.16...2.0.17[WEB]
- https://lists.debian.org/debian-lts-announce/2020/10/msg00029.html[WEB]
- https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-26870[WEB]
- https://research.securitum.com/mutation-xss-via-mathml-mutation-dompurify-2-0-17-bypass[WEB]
- https://snyk.io/vuln/SNYK-JS-DOMPURIFY-1016634[WEB]
- https://www.oracle.com//security-alerts/cpujul2021.html[WEB]
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:npm/dompurify"]}'