Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. nbconvert
  4. ›
  5. CVE-2026-6658

CVE-2026-6658: jupyter/nbconvert allows Cross-site Scripting (XSS) via unsanitized `text/vnd.mermaid` output in HTML exports

June 26, 2026 (updated November 6, 2026)

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.

References

  • github.com/advisories/GHSA-9754-6rhw-gj3h
  • huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe
  • nvd.nist.gov/vuln/detail/CVE-2026-6658

Code Behaviors & Features

Detect and mitigate CVE-2026-6658 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 7.17.0

Solution

Unfortunately, there is no solution available yet.

Impact 5.4 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/nbconvert/CVE-2026-6658.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:54 +0000.