Behavior-change / secure-defaults proposal (not a hidden-vuln claim)
Please consider making the DEFAULT preset mirror upstream JS markdown-it (html:false) with opt-in raw HTML, as an ecosystem-consistency hardening step. CVE-2025-7969 is the recent precedent for markdown/HTML raw-injection-by-default class risk.
Status quo: markdown-it-py 4.2.0 MarkdownIt() defaults html=True (raw HTML passes through unescaped); upstream JS markdown-it 15.0.0 'default' preset is html:false (escapes). Consequence below is the exploit chain through the DEFAULT render API:
from markdown_it import MarkdownIt
MarkdownIt().render('<script>alert(1)</script>') # -> raw <script> in output (executes); JS escapes to <script>
All extant markdown-it-py advisories (GHSA-jrwr-5x3p-hvc3, GHSA-vrjv-mxr7-vjf8, PYSEC-2023-23/24) are DoS; none cover this default. Ask: either switch the default to html:false (breaking change; deprecate html:true default) or clearly document + harden guidance (set html=False / sanitize for untrusted input). Framed as behavior-change request so it is not closable as WAI.
Behavior-change / secure-defaults proposal (not a hidden-vuln claim)
Please consider making the DEFAULT preset mirror upstream JS markdown-it (html:false) with opt-in raw HTML, as an ecosystem-consistency hardening step. CVE-2025-7969 is the recent precedent for markdown/HTML raw-injection-by-default class risk.
Status quo: markdown-it-py 4.2.0
MarkdownIt()defaults html=True (raw HTML passes through unescaped); upstream JS markdown-it 15.0.0 'default' preset is html:false (escapes). Consequence below is the exploit chain through the DEFAULT render API:All extant markdown-it-py advisories (GHSA-jrwr-5x3p-hvc3, GHSA-vrjv-mxr7-vjf8, PYSEC-2023-23/24) are DoS; none cover this default. Ask: either switch the default to html:false (breaking change; deprecate html:true default) or clearly document + harden guidance (set html=False / sanitize for untrusted input). Framed as behavior-change request so it is not closable as WAI.