Skip to main content

justhtml CVE-2026-8445

| EUVDEUVD-2026-64659 CRITICAL
Cross-site Scripting (XSS) (CWE-79)
2026-08-23 VulnCheck GHSA-wf6m-786j-gxrr
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit untrusted HTML with encoded/raw-text payload
  2. Delivery
    App parses and calls to_markdown()
  3. Exploit
    Angle brackets emitted unescaped as raw HTML
  4. Execution
    Markdown rendered to HTML for victim
  5. Impact
    Injected script executes in victim browser

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires an application that (1) uses justhtml's to_markdown() converter on attacker-influenced HTML and (2) renders the resulting Markdown back into HTML that is served to victims - the vulnerability is inert if the Markdown is never rendered as HTML. The specific triggering inputs are text nodes containing HTML-significant characters, most reliably entity-decoded text (e.g. &lt;script&gt;) or text inside RCDATA/RAWTEXT-parsed elements: <title>, <textarea>, <noscript>, and <plaintext>. Limiting factors: it does not affect the to_html() output path, it does not apply to real <script>/<style> DOM elements (dropped unless html_passthrough=True), and actual code execution depends on a victim viewing the rendered output in a browser rather than on the parse step alone.

Impact

The supplied CVSS 4.0 vector (9.3, AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H) rates this Critical, but that scoring appears aggressive for a stored/reflected XSS sanitizer bypass: real impact is confined to the browser context of a victim who renders the Markdown, exploitation realistically requires that downstream rendering (a form of user/system interaction), and availability impact (VA:H) is not well supported by the described behavior. EPSS is not provided in the input, and the CVE is not listed in CISA KEV, so there is no evidence of active exploitation - the elevated signal here is the existence of a published PoC, not in-the-wild use. This is a legitimate priority for any application that feeds untrusted HTML through justhtml's to_markdown() and then renders the result, but the blanket VC:H/VI:H/VA:H should be treated with caution; a more defensible assessment is a medium-severity XSS with scope change (see assessed vectors). No conflict exists on the attack vector (network is plausible), but the impact metrics are the point of divergence.

Exploit ScenarioDerived

An attacker submits content such as <title>&lt;img src=x onerror=alert(1)&gt;</title> or entity-encoded markup to an application that stores it, parses it with justhtml, and publishes it via to_markdown(); the angle brackets survive unescaped, so when the Markdown is rendered to HTML the injected <img onerror> executes JavaScript in a victim's browser. A proof-of-concept demonstrating the general case (<p>&lt;img src=x onerror=alert(1)&gt;</p>) is published in the vendor advisory, lowering the bar to reproduce.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 23, 2026

Sanitizer bypass in the justhtml Python library (versions <= 1.11.0) allows attacker-controlled input to survive as raw HTML in the output of to_markdown(), enabling cross-site scripting when that Markdown is later rendered. Although to_html() safely neutralizes the same input, the Markdown serializer escapes only a handful of Markdown metacharacters and leaves angle brackets (< and >) intact, so entity-decoded text (e.g. &lt;script&gt;) or text from RCDATA/RAWTEXT elements like <title>, <textarea>, <noscript>, and <plaintext> is emitted verbatim. Publicly available exploit code exists (a proof-of-concept is published in the vendor advisory), and the flaw is fixed in 1.12.0.

RemediationAI

Vendor-released patch: 1.12.0 - upgrade justhtml to 1.12.0 or later (pip install --upgrade justhtml) as the primary fix; see GHSA-3rcm-vjrc-p45j. If immediate upgrade is not possible, the actionable compensating controls are to treat to_markdown() output as untrusted and run it through a downstream HTML sanitizer after it is rendered to HTML (e.g. sanitize the rendered output with an allowlist-based sanitizer), or avoid the to_markdown() path entirely and use to_html() (which already neutralizes this input) where a Markdown intermediary is not strictly required; the trade-off is added processing and loss of the Markdown conversion feature. Do not rely on html_passthrough remaining False as a mitigation, since the bypass stems from text-node serialization rather than passthrough of real script elements. Confirm the fix version against the vendor advisory before deploying.

Affected VersionsENISA

justhtml 0 <1.12.0

Affected Packages

pypi justhtml fix: 1.12.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

justhtml is a Python HTML parsing and sanitization library (pip package 'justhtml', maintainer emilstenstrom) whose to_markdown() converter turns a parsed DOM into Markdown. The root cause is a CWE-79 (Improper Neutralization of Input During Web Page Generation) failure in the Markdown text-node serializer: it applies Markdown metacharacter escaping but does not encode HTML-significant characters, so '<' and '>' pass through unescaped. Because HTML parsing entity-decodes text and treats the contents of RCDATA/RAWTEXT-parsed elements (<title>, <textarea>, <noscript>, <plaintext>) as text rather than markup, strings that were harmless in the DOM are reconstituted as live HTML tags in the Markdown. Note that genuine <script>/<style> elements are already dropped by to_markdown() unless html_passthrough=True, so this is specifically about text content that becomes markup, not passthrough of real script nodes.

Know when Justhtml gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 6.1 MEDIUM

Sanitizer-bypass XSS: network-reachable, no privileges, but a victim must render the output (UI:R); scope changes to the browser (S:C) with limited C/I and no availability impact.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 23, 2026 - 14:01 EUVD
CVE Published
Aug 23, 2026 - 13:34 cve.org
CRITICAL 9.3

DescriptionCVE.org

justhtml versions <= 1.11.0 (fixed in 1.12.0) do not sufficiently escape HTML-significant characters (angle brackets) in text nodes when converting a parsed document to Markdown via to_markdown(). While a small set of Markdown metacharacters are escaped, characters such as < and > are preserved, so untrusted input that is safe in to_html() - including entity-decoded text (e.g. &lt;script&gt;) or text from RCDATA/RAWTEXT-parsed elements like <title>, <textarea>, <noscript>, and <plaintext> - can be emitted as raw HTML in the Markdown output, enabling a sanitizer bypass and potential cross-site scripting when that output is rendered.

Executive ViewAI

Why It Matters

The justhtml Python library (versions ≤1.11.0) contains a critical cross-site scripting vulnerability that bypasses the library's sanitization controls, allowing attackers to inject malicious code through the markdown conversion function. Any organization using this library to process user-generated content faces immediate risk of account compromise, data theft, and reputational damage. This vulnerability requires emergency patching within 24 hours.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 69% exploitable
Prevalence
Low
niche single-maintainer Python HTML library, limited production footprint
Social Media
4
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2026-9769 HIGH POC
8.7 Aug 23

Uncontrolled recursion in the justhtml Python HTML parsing library (all versions through 1.9.1) allows any remote unauth

CVE-2026-7808 CRITICAL
9.3 Aug 23

Cross-site scripting via HTML sanitization bypass affects justhtml (a Python HTML parsing/sanitization library by EmilSt

CVE-2026-5388 CRITICAL
9.3 Aug 23

Sanitization bypass in justhtml (a Python HTML/Markdown sanitization library) before 1.15.0 lets attacker-controlled inp

CVE-2026-4671 HIGH
8.7 Aug 23

Uncontrolled resource consumption in justhtml before 1.18.0 enables denial-of-service conditions through CPU and memory

CVE-2026-77088 MEDIUM
5.3 Aug 23

Cross-site scripting in justhtml 0.9.0-1.21.0 allows an attacker who can control the text content of HTML code or pre el

CVE-2026-74793 MEDIUM
5.1 Aug 23

Cross-site scripting in justhtml before 3.11.0 allows remote unauthenticated attackers to execute arbitrary JavaScript i

CVE-2026-8630 MEDIUM
5.1 Aug 23

Mutation XSS in justhtml (versions ≤1.11.0) allows injection of arbitrary HTML into serialized output when applications

CVE-2026-5751 MEDIUM
5.1 Aug 23

Mutation XSS (mXSS) in justhtml 1.13.0 and earlier enables markup injection bypass against applications using non-defaul

CVE-2026-5389 MEDIUM
5.1 Aug 23

Cross-site scripting in justhtml versions before 1.13.0 allows attackers who control `<pre>` element content to break ou

CVE-2026-6827 MEDIUM
5.1 Aug 23

Sanitization bypass in justhtml (Python HTML sanitization library) before version 1.17.0 enables cross-site scripting in

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy