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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | nbconvert | No fix yet | — |
| Debian 13 | nbconvert | No fix yet | — |
| Debian 12 | nbconvert | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | nbconvert | No fix yet | — |
| Ubuntu 18.04 LTS | nbconvert | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-nbconvert | 7.17.1-2.1 | openSUSE-SU-2026:11725-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | nbconvert | <= 7.17.0 | — | GHSA-9754-6rhw-gj3h |
Advisories 1
- openSUSE-SU-2026:11725-1 jupyter-nbconvert-7.17.1-2.1 on GA media SUSE / openSUSE Security Updates · Sep 9, 2026