CVE-2026-59929·Python vulnerability
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.
- Severity
- medium
- Software
- Python
- Fixed in
- 3.3.0
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.20% — higher than 10% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Affected versions
Until: 3.3.0
Fixed in: 3.3.0
How to fix this CVE
Upgrade Mistune to version 3.3.0 or later to patch the incomplete URL scheme validation in the safe_url filter. Applications using Mistune for Markdown rendering should prioritize this update, as the vulnerability allows legacy and chained URI schemes to bypass the protection mechanism and potentially execute malicious scripts in user browsers. Verify the update is applied by checking the installed Mistune version in your Python environment.
sudo dnf update python3-mistuneDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
GET|POST request with href or src attributes containing legacy URI schemes: (feed:|view-source:|jar:|livescript:|mocha:|ms-its:|mk:|res:) followed by potentially executable content (e.g., feed://attacker.com/script.js or view-source:javascript:alert)WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block outbound HTML/markdown content containing legacy URI schemes in href and src attributes. Create a rule blocking regex: ^(feed|view-source|jar|livescript|mocha|ms-its|mk|res):// in rendered link destinations before delivery to clients.How to check if you are affected
- Step 1: Check installed Mistune version with: python3 -c "import mistune; print(mistune.__version__)"
- Step 2: Identify applications using Mistune by searching Python site-packages: find /usr -name "mistune*" -type d 2>/dev/null
- Step 3: Search web server logs for unusual URI schemes in referrer or request paths: grep -iE '(feed:|view-source:|jar:|livescript:|mocha:|ms-its:|mk:|res:)' /var/log/apache2/access.log /var/log/nginx/access.log
- Step 4: Verify the patch by running: python3 -c "import mistune; from packaging import version; print('Patched' if version.parse(mistune.__version__) >= version.parse('3.3.0') else 'Vulnerable')"
FAQ
What is CVE-2026-59929?
CVE-2026-59929 is a URL validation bypass in Mistune's safe_url filter that fails to block legacy and chained URI schemes (feed:, view-source:, jar:, livescript:, mocha:, ms-its:, mk:, res:), allowing injected links to execute scripts when clicked by users in vulnerable browsers.
Is CVE-2026-59929 being actively exploited?
No, there is no evidence of active exploitation in the wild, and no public exploits are currently available. However, organizations should still apply the patch promptly as a defense-in-depth measure.
What versions of Python are affected by CVE-2026-59929?
Any version of Python using Mistune prior to 3.3.0 is affected. The vulnerability exists in Mistune's safe_url filter, not in Python itself, so all Python installations relying on vulnerable Mistune versions are at risk.
How do I check if my server is vulnerable to CVE-2026-59929?
Run: python3 -c "import mistune; print(mistune.__version__)" and verify the version is 3.3.0 or later. If the version is earlier than 3.3.0, your installation is vulnerable.
Does Defensia detect CVE-2026-59929?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Mistune is installed on a monitored server, CVE-2026-59929 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-59929. Free for 1 server.
Get started free