Advisory

GHSA-9754-6rhw-gj3h

Also known as: CVE-2026-6658

Summary

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

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-06-26 12:30 UTC
Modified
2026-11-06 18:00 UTC

Affected packages and fixes

nbconvert

PyPI · All systems

Affected

  • introduced 0, last affected 7.17.0 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences