← Back to CVE Explorer

CVE-2026-6658

Full vulnerability record from the local CVENow database.

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.

Severity
MEDIUM
CVSS score
5.4 (v3.0)
Vulnerability status
Deferred
Source identifier
Published
2026-06-26 10:16:22.810000
Last modified
2026-10-25 22:10:00.150000
View original CVE JSON
{
  "id": "CVE-2026-6658",
  "sourceIdentifier": "[email protected]",
  "published": "2026-06-26T10:16:22.810",
  "lastModified": "2026-10-25T22:10:00.150",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "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."
    },
    {
      "lang": "es",
      "value": "Una vulnerabilidad en las versiones menor o igual que 7.17.0 de jupyter/nbconvert permite cross-site scripting (XSS) a través de la salida ’text/vnd.mermaid’ sin sanitizar en las exportaciones HTML. El bloque ’data_mermaid’ en ’share/templates/lab/base.html.j2’ renderiza la salida de celda ’text/vnd.mermaid’ directamente en HTML sin escapar, permitiendo a los atacantes inyectar HTML/JavaScript arbitrario al salir de la etiqueta ’[pre]’. Esta vulnerabilidad afecta a cualquier servidor que utilice nbconvert para renderizar cuadernos como HTML, permitiendo a los atacantes ejecutar JavaScript arbitrario en el contexto de los usuarios que visualizan la exportación HTML."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "jupyter",
          "product": "jupyter/jupyter",
          "versions": [
            {
              "version": "unspecified",
              "lessThanOrEqual": "latest",
              "versionType": "custom",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV30": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.0",
          "vectorString": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
          "baseScore": 5.4,
          "baseSeverity": "MEDIUM",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "LOW",
          "userInteraction": "REQUIRED",
          "scope": "CHANGED",
          "confidentialityImpact": "LOW",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.3,
        "impactScore": 2.7
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-06-26T10:19:03.505659Z",
          "id": "CVE-2026-6658",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-79"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe",
      "source": "[email protected]"
    },
    {
      "url": "https://huntr.com/bounties/47570290-3b26-4477-8cfa-fdef7db5aefe",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}