PyPI: nbconvert

CVE-2021-32862

Safety vulnerability ID: SFTY-20220818-51015

Safety legacy ID: pyup.io-50792

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). https://github.com/jupyter/nbconvert/security/advisories/GHSA-9jmq-rx5f-8jwq

Created at: Jul 5, 2026Updated at: Jul 5, 2026

Overview

nbconvert vulnerable to cross-site scripting (XSS) via multiple exploit paths

Advisory

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). https://github.com/jupyter/nbconvert/security/advisories/GHSA-9jmq-rx5f-8jwq

Affected Package

Affecting nbconvert package, versions<6.5.1

Also affects

---

How to Fix

Upgradenbconvertto6.5.1or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more