Sceawere

Vulnerability Detail

CVE-2026-8445UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

justhtml Markdown Sanitizer Bypass Vulnerability

Vulnerability Metadata

Severity
Critical
Score / CVSS
9.8
Creation Date
3h ago
Vendor
EmilStenstrom
Product
justhtml
Attack Type
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Vector String
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Complexity
LOW

Narrative and Response

Description

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 Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "9.8",
  "pubDate": "2026-08-23T14:16:54.957Z",
  "pubdate": "2026-08-23T14:16:54.957Z",
  "executiveSummary": "A sanitizer bypass vulnerability exists in justhtml versions <= 1.11.0 (fixed in 1.12.0) during the conversion of a parsed HTML document to Markdown via the to_markdown() function. The vulnerability arises from insufficient escaping of HTML-significant characters, specifically angle brackets (< and >), within text nodes of the parsed document.\nThe impact of this vulnerability includes potential cross-site scripting (XSS) when the resulting Markdown output is subsequently rendered in a web context. Untrusted input that is safely handled by to_html() can bypass security controls because entity-decoded text, such as &lt;script&gt;, and text originating from RCDATA or RAWTEXT-parsed elements like <title>, <textarea>, <noscript>, and <plaintext>, are emitted as raw, unescaped HTML in the generated Markdown output.\nAffected systems include applications utilizing justhtml <= 1.11.0 to convert parsed HTML documents to Markdown format. The risk implication is significant for downstream applications that trust Markdown renderers to sanitize or neutralize malicious HTML payloads. Attackers can leverage this flaw by supplying specially crafted untrusted input containing raw or entity-encoded HTML tags that are preserved during conversion, requiring no special authentication or privileges beyond the ability to inject input into the conversion pipeline.",
  "technicalDetails": "The vulnerability resides in the to_markdown() function of the justhtml library, specifically within the handling and serialization of text nodes when converting a parsed document structure into Markdown format. The root cause of the issue is an incomplete character-escaping implementation that fails to properly neutralize HTML-significant characters, such as angle brackets (< and >). Although the library escapes a limited set of Markdown metacharacters, it neglects to encode or escape raw angle brackets present in text nodes.\nDuring standard HTML parsing, elements categorized under RCDATA and RAWTEXT—such as <title>, <textarea>, <noscript>, and <plaintext>—along with entity-decoded sequences (e.g., &lt;script&gt;), are processed into text nodes or specialized content containers. While functions like to_html() properly neutralize these inputs to prevent execution, the to_markdown() conversion logic directly emits these characters without transformation. Consequently, malicious payloads injected into these elements are preserved in their raw HTML form within the Markdown string.\nThe attack flow proceeds as follows: 1) An attacker supplies untrusted input containing malicious HTML or JavaScript payloads, potentially encoded as HTML entities or embedded within RCDATA/RAWTEXT elements like <textarea> or <title>. 2) The justhtml parser processes the input document. 3) The application invokes to_markdown() to serialize the parsed document into Markdown. 4) The vulnerable serialization logic fails to escape angle brackets in text nodes, causing the malicious payload to be output as raw HTML tags rather than escaped text. 5) When a downstream Markdown renderer processes and displays the output in a browser, the raw HTML is interpreted, executing the injected script and achieving cross-site scripting.\nThe vulnerable component is the to_markdown() method across all versions of justhtml <= 1.11.0. Exploitation does not require authentication or elevated privileges, provided the attacker can supply input to the conversion function. The network exposure and impact depend entirely on how and where the generated Markdown output is rendered by downstream consuming applications."
}
CVE-2026-8445: justhtml Markdown Sanitizer Bypass Vulnerability (CRITICAL Severity, CVSS: 9.8) - Sceawere