---
id: CVE-2026-59929
aliases:
  - PYSEC-2026-2217
  - GHSA-qfrw-5rxm-mhh2
title: >-
  Mistune is a Python Markdown parser with renderers and plugins. Prior to
  3.3.0, the safe_url filter in src/mistune/renderers/html.py bloc…
summary: >-
  Mistune is a Python Markdown parser with renderers and plugins. Prior to
  3.3.0, the safe_url filter in src/mistune/renderers/html.py blocks only
  javascript:, vbscript:, file:, and data: schemes, allowing legacy or chained
  schemes such as…
severity: medium
cvss: 6.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'
vendor: mistune
product: mistune
ecosystem: pip
affected:
  - mistune < 3.3.0
patched:
  - mistune 3.3.0
published: '2026-07-08'
updated: '2026-07-13'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/PYSEC-2026-2217'
references:
  - url: 'https://github.com/lepture/mistune/releases/tag/v3.3.0'
  - url: >-
      https://github.com/lepture/mistune/commit/c7101fcbb6e8790e8e39157c5ca2238fc6dd6cbc
  - url: 'https://github.com/lepture/mistune/security/advisories/GHSA-qfrw-5rxm-mhh2'
tags:
  - osv
  - pip
epss: 0.00341
epssPercentile: 0.24869
ingestedAt: '2026-07-13T18:58:08.238Z'
---

## Overview

Mistune is a Python Markdown parser with renderers and plugins. Prior to 3.3.0, the safe_url filter in src/mistune/renderers/html.py blocks only javascript:, vbscript:, file:, and data: schemes, allowing legacy or chained schemes such as feed:, view-source:, jar:, livescript:, mocha:, ms-its:, mk:, and res: to reach rendered href and src attributes and potentially execute script in affected user agents. This issue is fixed in version 3.3.0.

## Affected packages

- `mistune < 3.3.0`

## Remediation

Upgrade to a patched release:

- `mistune 3.3.0`
