CVE-2026-6658
MEDIUM 5.4CVSS 3.0jupyter/nbconvert allows Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports
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.
- Published
- 26 Jun 2026
- Last modified
- 6 Nov 2026
- Assigned by
- security@huntr.dev
- NVD status
- Deferred
- Weakness
- CWE-79
- Also known as
- GHSA-9754-6rhw-gj3h
- Sources
- NVDJSONOSV GHSA-9754-6rhw-gj3hJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | MEDIUM 5.4 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.0 | MEDIUM 5.4 | CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | nbconvert | <= 7.17.0 |
References
- https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-6658 · ADVISORY
- https://github.com/jupyter/nbconvert · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 26 Jun 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 26 Jun 2026)