CVE-2026-6658: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyter jupyter/jupyter
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.
AI Analysis
Technical Summary
This vulnerability affects jupyter/nbconvert versions <= 7.17.0. The issue is located in the `data_mermaid` block within the `share/templates/lab/base.html.j2` template, which renders `text/vnd.mermaid` cell output directly into HTML without proper escaping. Because of this, an attacker can craft malicious notebook content that, when converted to HTML, injects arbitrary HTML or JavaScript code by breaking out of the `<pre>` tag. This results in Cross-site Scripting (CWE-79) that can execute arbitrary scripts in the context of users viewing the HTML export. The vulnerability requires at least low privileges (PR:L) and user interaction (UI:R) and impacts confidentiality and integrity with no impact on availability. The CVSS v3.0 base score is 5.4 (medium severity). No official patch or remediation guidance is currently available, and no known exploits are reported in the wild.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of users viewing HTML exports of notebooks generated by nbconvert. This can lead to information disclosure or manipulation of the rendered content. The vulnerability affects confidentiality and integrity but does not impact availability. It requires user interaction and some privileges on the server to inject malicious content.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid rendering or sharing HTML exports of notebooks containing `text/vnd.mermaid` output from untrusted sources. Applying strict content sanitization or disabling rendering of `text/vnd.mermaid` output in HTML exports may reduce risk.
CVE-2026-6658: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyter jupyter/jupyter
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 v3.0
Score 5.4medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability affects jupyter/nbconvert versions <= 7.17.0. The issue is located in the `data_mermaid` block within the `share/templates/lab/base.html.j2` template, which renders `text/vnd.mermaid` cell output directly into HTML without proper escaping. Because of this, an attacker can craft malicious notebook content that, when converted to HTML, injects arbitrary HTML or JavaScript code by breaking out of the `<pre>` tag. This results in Cross-site Scripting (CWE-79) that can execute arbitrary scripts in the context of users viewing the HTML export. The vulnerability requires at least low privileges (PR:L) and user interaction (UI:R) and impacts confidentiality and integrity with no impact on availability. The CVSS v3.0 base score is 5.4 (medium severity). No official patch or remediation guidance is currently available, and no known exploits are reported in the wild.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of users viewing HTML exports of notebooks generated by nbconvert. This can lead to information disclosure or manipulation of the rendered content. The vulnerability affects confidentiality and integrity but does not impact availability. It requires user interaction and some privileges on the server to inject malicious content.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, users should avoid rendering or sharing HTML exports of notebooks containing `text/vnd.mermaid` output from untrusted sources. Applying strict content sanitization or disabling rendering of `text/vnd.mermaid` output in HTML exports may reduce risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- @huntr_ai
- Date Reserved
- 2026-04-20T08:17:42.331Z
- Cvss Version
- 3.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3e4dee4853345fc1a745bd
Added to database: 06/26/2026, 10:01:18 UTC
Last enriched: 06/26/2026, 10:16:02 UTC
Last updated: 06/26/2026, 11:01:23 UTC
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.