QID 983069

QID 983069: Nodejs (npm) Security Update for dompurify (GHSA-chqj-j4fh-rw7m)

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:
```DOMPurify.sanitize(input, {
FORBID_TAGS: ['svg', 'math']
});```

Successful exploitation of this vulnerability may affect the confidentiality, integrity, and availability of the targeted user.

  • CVSS V3 rated as High - 6.1 severity.
  • CVSS V2 rated as Medium - 4.3 severity.
  • Solution
    Customers are advised to refer to GHSA-chqj-j4fh-rw7m for updates pertaining to this vulnerability.
    Vendor References

    CVEs related to QID 983069

    Software Advisories
    Advisory ID Software Component Link
    GHSA-chqj-j4fh-rw7m dompurify URL Logo github.com/advisories/GHSA-chqj-j4fh-rw7m