CVE-2026-6658

NameCVE-2026-6658
DescriptionA 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
nbconvert (PTS)bullseye5.6.1-3vulnerable
bullseye (security)5.6.1-3+deb11u1vulnerable
bookworm6.5.3-3vulnerable
trixie7.16.6-1vulnerable
forky, sid7.17.1-2vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
nbconvertsource(unstable)(unfixed)

Notes

https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe

Search for package or bug name: Reporting problems