{"id":"CVE-2026-6658","aliases":["GHSA-9754-6rhw-gj3h"],"title":"jupyter/nbconvert allows Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports","summary":"jupyter/nbconvert allows Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports","severity":"medium","cvss":5.4,"cvssVector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","vendor":"nbconvert","product":"nbconvert","ecosystem":"pip","affected":["nbconvert <= 7.17.0"],"published":"2026-06-26","updated":"2026-11-06","sourceUpdated":"2026-11-06T18:00:04.178054901Z","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-9754-6rhw-gj3h","references":[{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-6658"},{"url":"https://github.com/jupyter/nbconvert"},{"url":"https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe"},{"url":"https://github.com/advisories/GHSA-9754-6rhw-gj3h"}],"tags":["osv","pip","ghsa"],"epss":0.00161,"epssPercentile":0.05287,"cwe":["CWE-79"],"ingestedAt":"2026-11-06T18:00:12.490Z","slug":"CVE-2026-6658","body":"## Overview\n\nA 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.\n\n## Affected packages\n\n- `nbconvert <= 7.17.0`\n\n## Remediation\n\nRefer to the advisory for the patched release.","depth":"sunlit","depthScore":30,"depthScoreParts":{"impact":29.7,"likelihood":0,"exploitation":0,"ransomware":0},"changes":[]}