CVE-2026-8445Medium▾ SunlitJustHTML has a Sanitizer Bypass (in Markdown)
▾ Sunlit zone — Low / medium · no exploitation signal
impact 27.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Exploit-prediction probability, daily snapshots since Aug 24.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via OSV
Last analysed / modified upstream
0.4%
to_markdown() does not sufficiently escape text content that looks like HTML. As a result, untrusted input that is safe in to_html() can become raw HTML in Markdown output.
This is not specific to tokenizer raw-text states like <title>, <noscript>, or <plaintext>, although those states can trigger the behavior. The root cause is broader: Markdown text serialization leaves angle brackets unescaped in text nodes.
When converting a parsed document to Markdown, text nodes are escaped for a small set of Markdown metacharacters, but HTML-significant characters such as < and > are preserved. That means content parsed as text, including entity-decoded text or text produced by RCDATA/RAWTEXT-style parsing, can be emitted into Markdown as raw HTML.
Examples of affected input include:
<script>...</script><title>, <textarea>, <noscript> (when parsed as raw text), and <plaintext>This is distinct from actual <script> or <style> elements in the DOM. Those are already dropped by default in to_markdown() unless html_passthrough=True.
from justhtml import JustHTML
doc = JustHTML("<p><img src=x onerror=alert(1)></p>", fragment=True)
print(doc.to_html())
print()
print(doc.to_markdown())
## Affected packages
- `justhtml < 1.12.0`
## Remediation
Upgrade to a patched release:
- `justhtml 1.12.0`
Connected by shared product, vendor, weakness, or advisory.
CVE-2026-6827Mediumjusthtml has sanitization bypass in custom policies and programmatic DOM
CVE-2026-9769HighUncontrolled recursion DoS in JustHTML() via deeply nested HTML
CVE-2026-4671Lowjusthtml introduces denial-of-service hardening
CVE-2026-5751Lowjusthtml: Mutation XSS with custom foreign-namespace sanitization policies
CVE-2026-8630MediumJustHTML Affected by Mutation XSS via Literal Text Serialization in Raw Text Elements (style/script)
CVE-2026-77088Medium· 6.1justhtml: to_markdown() code-span blank-line breakout enables XSS