CVE-2026-6658
Received Received - Intake
Cross-site Scripting in Jupyter nbconvert HTML Export

Publication date: 2026-06-26

Last updated on: 2026-06-26

Assigner: huntr.dev

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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-26
Last Modified
2026-06-26
Generated
2026-06-26
AI Q&A
2026-06-26
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
jupyter nbconvert to 7.17.0 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Executive Summary

This vulnerability exists in jupyter/nbconvert versions up to 7.17.0 and allows for Cross-site Scripting (XSS) attacks. It occurs because the `text/vnd.mermaid` output in HTML exports is not properly sanitized. Specifically, the `data_mermaid` block in the template `share/templates/lab/base.html.j2` renders this output directly into HTML without escaping it. This flaw enables attackers to inject arbitrary HTML or JavaScript by breaking out of the `<pre>` tag.

As a result, any server using nbconvert to render notebooks as HTML is vulnerable, allowing attackers to execute malicious JavaScript in the context of users who view the HTML export.

Impact Analysis

This vulnerability can impact you by allowing attackers to execute arbitrary JavaScript code in the browsers of users who view the HTML exports generated by nbconvert. This can lead to unauthorized actions such as stealing user credentials, session hijacking, or performing actions on behalf of the user without their consent.

Because the attack exploits Cross-site Scripting, it can compromise the security and privacy of users interacting with the affected HTML exports.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-6658. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart