# CVE-2026-6658: Cross-site Scripting (XSS) in jupyter/nbconvert

- Severity: Medium 5.4 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.16%, higher than 5% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-26T09:40:30.952Z
- Modified: 2026-11-06T18:00:04.178Z
- Also known as: GHSA-9754-6rhw-gj3h
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- jupyter jupyter/jupyter: from unspecified up to latest
- nbconvert (PyPI): up to 7.17.0

## Every score

- @huntr_ai: CVSS:3.0 5.4 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.0 5.4 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe> (exploit, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-6658> (advisory)
- <https://github.com/jupyter/nbconvert> (package)

## Sources

- CVE List: [CVE-2026-6658](https://www.cve.org/CVERecord?id=CVE-2026-6658), CVE Terms of Use, modified 2026-06-26
- GitHub Advisory Database: [GHSA-9754-6rhw-gj3h](https://github.com/advisories/GHSA-9754-6rhw-gj3h), CC-BY-4.0, modified 2026-11-06
- NVD: [CVE-2026-6658](https://nvd.nist.gov/vuln/detail/CVE-2026-6658), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-6658 · Whole record: https://cve.day/CVE-2026-6658.json · Rebuilt by cve.day 2026-11-25T22:59:26.460Z
