Skip to content
OpenAdvisories
Medium · 5.4 CVE-2026-6658 EUVD-2026-39642GHSA-9754-6rhw-gj3h

Cross-site Scripting (XSS) in jupyter/nbconvert

Published Jun 26, 2026 · Updated Jun 26, 2026 · Assigned by @huntr_ai

Description

A vulnerability in jupyter/nbconvert versions <= 7.17.0 allows for Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports. The `data_mermaid` block in `share/templates/lab/base.html.j2` renders `text/vnd.mermaid` cell output directly into HTML without escaping, enabling attackers to inject arbitrary HTML/JavaScript by breaking out of the `<pre>` tag. This vulnerability impacts any server using nbconvert to render notebooks as HTML, allowing attackers to execute arbitrary JavaScript in the context of users viewing the HTML export.

Affected products

VendorProductAffectedFixed
jupyter jupyter/jupyter unspecified – ≤ latest —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 nbconvert No fix yet —
Debian 13 nbconvert No fix yet —
Debian 12 nbconvert No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 nbconvert No fix yet —
Ubuntu 26.04 LTS nbconvert No fix yet —
Ubuntu 25.10 nbconvert No fix yet —
Ubuntu 24.04 LTS nbconvert No fix yet —
Ubuntu 22.04 LTS nbconvert No fix yet —
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS nbconvert No fix yet —
Ubuntu 18.04 LTS nbconvert No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-nbconvert 7.17.1-2.1 openSUSE-SU-2026:11725-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI nbconvert <= 7.17.0 — GHSA-9754-6rhw-gj3h

Advisories 1

References