QID 981587

QID 981587: Python (pip) Security Update for bleach (GHSA-q65m-pv3f-wr5r)

Security update has been released for bleach to fix the vulnerability.

Note: The preceding description block is extracted directly from the security advisory. Using automation, we have attempted to clean and format it as much as possible without introducing additional issues.

A [mutation XSS](https://cure53.de/fp170.pdf) affects users calling `bleach.clean` with `noscript` and a raw tag (see below) in the allowed/whitelisted tags option.

  • CVSS V3 rated as High - 6.1 severity.
  • CVSS V2 rated as Medium - 4.3 severity.
  • Solution
    v3.1.1Workaround:
    * modify `bleach.clean` calls to not whitelist `noscript` and one or more of the following raw tags:

    ```
    title
    textarea
    script
    style
    noembed
    noframes
    iframe
    xmp
    ```

    * A strong [Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) without `unsafe-inline` and `unsafe-eval` [`script-src`s](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src)) will also help mitigate the risk.
    Vendor References

    CVEs related to QID 981587

    Software Advisories
    Advisory ID Software Component Link
    GHSA-q65m-pv3f-wr5r bleach URL Logo github.com/advisories/GHSA-q65m-pv3f-wr5r