# CVE-2021-32862: nbconvert vulnerable to cross-site scripting (XSS) via multiple exploit paths

Source: https://junglewise.ai/threats/cve-2021-32862-nbconvert-vulnerable-to-cross-site-scripting-xss-via-multiple  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2022-08-18  
License: CC BY 4.0 with a link back

CVE-2021-32862 · Severity: low · CVSS 3.1 · Published 2022-08-18

The GitHub Security Lab discovered sixteen ways to exploit a cross-site scripting vulnerability in nbconvert. When using nbconvert to generate an HTML version of a user-controllable notebook, it is possible to inject arbitrary HTML which may lead to cross-site scripting (XSS) vulnerabilities if these HTML notebooks are served by a web server (eg: nbviewer).

Technologies: [nbconvert (PyPI)](https://junglewise.ai/threats/technologies/nbconvert). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2021-32862 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-32862 being exploited in the wild.

**How severe is CVE-2021-32862?** Low severity, with a CVSS score of 3.1, published 18 August 2022.

**Which products and versions are affected?** nbconvert (PyPI) ECOSYSTEM:introduced=0,fixed=6.3.0a0, ECOSYSTEM:introduced=0,fixed=6.5.1.

**Is there a fix for CVE-2021-32862?** Yes. nbconvert (PyPI): upgrade to 6.3.0a0, 6.5.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2021-32862?** Check whether you run nbconvert (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nbconvert (PyPI): upgrade to 6.3.0a0, 6.5.1 or later

  ```sh
  pip install "nbconvert>=6.5.1"
  ```


## Affected products

- nbconvert (PyPI) ECOSYSTEM:introduced=0,fixed=6.3.0a0, ECOSYSTEM:introduced=0,fixed=6.5.1

## Identifiers

- CVE-2021-32862
- GHSA-9jmq-rx5f-8jwq
- PYSEC-2022-249

## Related threats

- [Jupyter nbconvert path traversal via output filename metadata](https://junglewise.ai/threats/cve-2026-114140-the-nbconvert-tool-jupyter-nbconvert-converts-jupyter-notebooks)
- [PYSEC-2026-1691 - nbconvert has an uncontrolled search path that leads to unauthorized code execution on Windows](https://junglewise.ai/threats/cve-2025-53000-nbconvert-has-an-uncontrolled-search-path-that-leads-to)
- [Jupyter nbconvert Cross-site Scripting in Mermaid HTML export](https://junglewise.ai/threats/cve-2026-6658-jupyter-nbconvert-cross-site-scripting-in-mermaid-html-export)
- [nbconvert has an Arbitrary File Read via Path Traversal in HTMLExporter Image Embedding](https://junglewise.ai/threats/cve-2026-39378-nbconvert-has-an-arbitrary-file-read-via-path-traversal-in)
- [nbconvert has an Arbitrary File Write via Path Traversal in Cell Attachment Filenames](https://junglewise.ai/threats/cve-2026-39377-nbconvert-has-an-arbitrary-file-write-via-path-traversal-in-cell)
