CVE-2026-6658 Cross-site Scripting (XSS) in jupyter/nbconvert
Attackers can inject arbitrary JavaScript into HTML exports via unsanitized Mermaid output, executing code in the viewer's browser context.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-6658?
CVE-2026-6658 is a medium-severity cross-site scripting vulnerability in jupyter/jupyter, published on 26 Jun 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2026-6658?
Linux distribution packages (1)
python-nbconvert openSUSE:Tumbleweed | All versions | 7.17.1-2.1 |
How do I fix CVE-2026-6658?
Upgrade to a fixed version.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-6658 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-6658 exists.
Sources
Also known as DEBIAN-CVE-2026-6658, GHSA-9754-6rhw-gj3h, UBUNTU-CVE-2026-6658, openSUSE-SU-2026:11725-1.