IntegSec - Next Level Cybersecurity

CVE-2026-8445: justhtml Markdown Sanitizer Bypass - What It Means for Your Business and How to Respond

Written by Mike Chamberland | 10/29/26, 4:15 PM

CVE-2026-8445: justhtml Markdown Sanitizer Bypass - What It Means for Your Business and How to Respond

Introduction

CVE-2026-8445 is a critical vulnerability in the justhtml library that can undermine the security controls many organizations rely on to make user-generated content safe. If your applications convert HTML to Markdown, display converted content, or accept content from customers, partners, employees, or third-party systems, this issue deserves prompt attention.

The vulnerability can allow unsafe HTML to survive a conversion process that should have neutralized it. When that content is later rendered in a browser, it may enable cross-site scripting, a common but serious web attack that can compromise user sessions, steal sensitive information, or manipulate what employees and customers see.

This post explains who is at risk, what the vulnerability means for business operations and compliance, how to determine whether you are affected, and the practical steps to reduce exposure. A technical appendix provides detection, verification, and remediation guidance for security engineers, penetration testers, and IT teams.

S1 — Background & History

CVE-2026-8445 affects justhtml, a Python library used to parse HTML and convert it into Markdown. Versions up to and including 1.11.0 are affected; version 1.12.0 contains the fix. The vulnerability was published on August 23, 2026, with public disclosure information dated March 18, 2026, and was credited to researcher kejcao.

The issue is a sanitizer bypass that can lead to cross-site scripting, classified as CWE-79. In plain language, the library fails to consistently neutralize angle bracket characters when converting parsed HTML into Markdown. As a result, content that appears safe after HTML conversion can emerge from Markdown conversion as executable or otherwise dangerous HTML.

The vulnerability carries a CVSS v4.0 base score of 9.3, rated Critical, with the vector CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SA:N/SC:N/SI:N. A CVSS v3.1 score of 9.8, also Critical, is associated with the advisory.

Key timeline events include the CVE reservation on May 12, 2026, public disclosure information on March 18, publication of the CVE record on August 23, and a CISA coordinated vulnerability assessment on August 24 noting that a proof of concept exists and that exploitation can be automated.

S2 — What This Means for Your Business

For a business, the central risk is not merely that a library has a bug. It is that a control intended to make untrusted content safe may fail silently. An attacker does not need valid credentials or physical access to submit malicious content through a public form, imported document, support ticket, comment field, or integrated third-party feed.

If your application converts that content to Markdown and later displays it, an attacker may be able to run script in another user’s browser. That can lead to stolen login sessions, unauthorized actions performed under a legitimate user’s identity, exposure of customer data, and manipulation of financial or operational records.

The impact extends beyond the immediate technical incident. A successful attack can interrupt customer-facing services, force emergency response work, and damage confidence in your platform. For organizations subject to data protection, financial, healthcare, or sector-specific security requirements, an incident involving customer data or compromised accounts may create notification, investigation, and audit obligations.

The risk is especially relevant for organizations that treat Markdown output as inherently safe because it passed through an HTML sanitizer. This vulnerability demonstrates why output context, rendering configuration, and downstream processing must be considered as part of the same security boundary.

S3 — Real-World Examples

Regional financial services provider: A regional bank accepts customer messages through an online support portal and converts submitted HTML into Markdown for internal case management. A malicious submission could execute script when an employee reviews the case, potentially exposing account details or enabling fraudulent actions from the employee’s session.

Mid-market healthcare platform: A healthcare technology company allows clinicians to import external patient education materials and converts them to Markdown for display in a clinical portal. Compromised content could alter instructions shown to staff or patients, creating patient-safety, privacy, and regulatory exposure.

E-commerce marketplace: A marketplace lets sellers provide rich product descriptions that are converted from HTML to Markdown. An attacker-controlled listing could target shoppers or marketplace administrators, steal session information, redirect buyers, or modify the appearance of checkout-related content.

Small SaaS provider: A small software company uses justhtml in an administrative tool that turns customer feedback into Markdown reports. Even with a limited user base, a single compromised administrator session could provide access to customer records, configuration settings, and other tenants’ data.

S4 — Am I Affected?

  • You use the Python justhtml package in any application, service, job, script, or container image.
  • You are running justhtml version 1.11.0 or earlier; version 1.12.0 or later includes the fix.
  • You call the library’s to_markdown() function, directly or through an internal wrapper, to convert parsed HTML into Markdown.
  • You accept HTML, rich text, documents, emails, web content, or other externally supplied input and convert it to Markdown.
  • You store, publish, email, export, or render the resulting Markdown in a browser, email client, content management system, help desk, documentation platform, or other interface that permits HTML.
  • You rely on an HTML sanitizer before conversion but do not independently control or sanitize the final Markdown rendering context.
  • You are uncertain whether third-party software, a managed service, or a vendor integration uses justhtml internally.

Key Takeaways

  • CVE-2026-8445 affects justhtml versions through 1.11.0 and is fixed in version 1.12.0.
  • The flaw can allow unsafe HTML to pass through Markdown conversion, creating a sanitizer bypass and potential cross-site scripting risk.
  • Businesses that accept untrusted content and render converted Markdown should treat this as a priority, especially where customer data, financial workflows, or regulated information is involved.
  • A critical CVSS score and available proof-of-concept information make timely inventory, patching, and validation important.
  • Patching the library is necessary, but organizations should also verify how Markdown is rendered and apply defense in depth across input handling, output encoding, and rendering controls.

Call to Action

If your organization uses justhtml or processes untrusted web content, do not wait for a security incident to reveal the gap. IntegSec can help you identify affected systems, validate exploitability in your environment, prioritize remediation, and test the controls that protect your customers and staff. Visit https://integsec.com to discuss a penetration test and a practical, business-aligned plan for reducing cybersecurity risk.

Technical Appendix

A — Technical Analysis

CVE-2026-8445 is a sanitizer bypass in the to_markdown() conversion path of the EmilStenstrom justhtml Python library. The affected component fails to sufficiently escape HTML-significant angle bracket characters in text nodes during HTML-to-Markdown conversion.

Although some Markdown metacharacters are escaped, < and > are preserved. Consequently, untrusted input that is safe when serialized through to_html(), including entity-decoded text such as an encoded script tag or text originating from RCDATA or RAWTEXT elements such as title, textarea, noscript, and plaintext, can be emitted as raw HTML in Markdown output.

The attack vector is network-based, with low attack complexity, no privileges required, and no user interaction required by the CVSS metric. Actual exploitation depends on the application accepting attacker-controlled HTML and later rendering the resulting Markdown in a context that permits HTML. The weakness is mapped to CWE-79, Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

The CNA-assigned CVSS v4.0 vector is 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, producing a 9.3 Critical score. The associated CVSS v3.1 vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, producing a 9.8 Critical score. The NVD reference is https://nvd.nist.gov/vuln/detail/CVE-2026-8445.

B — Detection & Verification

  • Enumerate installed versions with pip show justhtml, pip list | grep justhtml, or python -c "import justhtml; print(justhtml.__version__)".
  • Inventory dependencies with pip-audit, safety check, Dependabot, Snyk, or a software composition analysis platform, searching specifically for justhtml versions below 1.12.0.
  • Search source code and infrastructure configuration for imports and calls: grep -R "justhtml" ., grep -R "to_markdown(" ., and equivalent searches in container images, CI pipelines, and deployment manifests.
  • Use scanner signatures or custom checks that flag justhtml < 1.12.0, particularly where the package is reachable from internet-facing input handling or content-rendering workflows.
  • Review application logs for conversion jobs processing external HTML, unexpected raw HTML tags in stored Markdown, and requests containing encoded angle brackets, script-related payloads, or content derived from title, textarea, noscript, or plaintext elements.
  • Monitor for behavioral anomalies such as unexpected outbound requests from user sessions, new administrative actions following content review, altered content records, or browser telemetry showing script execution on pages that render converted Markdown.
  • In a controlled test environment, submit benign proof-of-concept input containing encoded or RCDATA-derived angle brackets, convert it with to_markdown(), and inspect whether raw HTML survives in the output. Do not test production systems without authorization.

C — Mitigation & Remediation

  1. Immediate (0–24 hours): Upgrade justhtml to version 1.12.0 or later, the official vendor-fixed release. Identify every application, worker, container image, virtual environment, and dependency lockfile that includes the package, then rebuild and redeploy affected components.
  2. Immediate (0–24 hours): Where immediate upgrade is not possible, disable or isolate to_markdown() processing of untrusted input. Prevent the resulting Markdown from being rendered with HTML enabled, restrict rendering to a strict safe subset, or route affected workflows through a separately maintained, patched service.
  3. Short-term (1–7 days): Re-test affected workflows after patching. Verify that encoded angle brackets, RCDATA and RAWTEXT-derived text, and other hostile HTML constructs no longer produce executable HTML in Markdown output.
  4. Short-term (1–7 days): Review stored content created while the vulnerable version was in use. Identify and reprocess or remove suspicious Markdown that may contain raw HTML, and investigate anomalous account activity or content changes during the exposure period.
  5. Long-term (ongoing): Establish dependency update management, automated software composition analysis, and release gates that block vulnerable package versions. Maintain an inventory of every location where untrusted content is converted, stored, and rendered.
  6. Long-term (ongoing): Apply defense in depth. Sanitize input according to its source, escape output for its exact rendering context, disable raw HTML in Markdown rendering unless there is a documented business need, and use a maintained sanitizer at the final rendering boundary.

D — Best Practices

  • Treat every conversion format as a distinct security boundary; safe HTML output does not guarantee safe Markdown output.
  • Keep justhtml and all content-processing dependencies current, with automated alerts for new security advisories.
  • Disable raw HTML in Markdown renderers unless a documented requirement makes it unavoidable.
  • Sanitize untrusted content at the point of final rendering, not only before storage or conversion.
  • Use automated tests with hostile HTML, encoded characters, and RCDATA or RAWTEXT content in regression suites for content pipelines.
  • Include third-party libraries, background jobs, and container images in vulnerability inventories, since vulnerable code may exist outside the primary application repository