Description
justhtml versions 1.13.0 and earlier contain a parser-differential / mutation cross-site scripting (mXSS) vulnerability when using a custom SanitizationPolicy that preserves foreign namespaces (e.g., drop_foreign_namespaces=False with allowlisted SVG/MathML elements or raw-text containers such as <style>). Specially crafted input can sanitize into markup that appears safe but becomes unsafe when re-parsed by a browser or another HTML parser, allowing markup injection. The default safe configuration (sanitize=True) is not affected. Fixed in 1.14.0.
Published: 2026-08-23
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Mutation Cross‑Site Scripting (client‑side code execution)
Action: Upgrade
AI Analysis

Impact

justhtml versions prior to 1.14.0 expose a mutation XSS when a custom SanitizationPolicy preserves foreign namespaces. An attacker can craft input that sanitizes to apparently safe markup, but when the browser or another parser re‑processes the output the payload is executed as script, enabling client‑side code execution. This flaw is a classic Injection/HTML Injection weakness, classified as CWE‑79.

Affected Systems

The vulnerability affects the justhtml library developed by EmilStenstrom. Versions 1.13.0 and all earlier releases are impacted. The default safe configuration is immune; the flaw appears only when custom policies allow SVG, MathML, or raw‑text containers while preserving foreign namespaces.

Risk and Exploitability

The CVSS score of 5.1 indicates moderate severity. EPSS is not available, so the current exploitation probability is unknown, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires the attacker to supply crafted content to the sanitizer, which is feasible in applications that expose justhtml user input without upgrading. When custom policies are employed, the flaw can be leveraged; otherwise it remains mitigated by the default safe settings.

Generated by OpenCVE AI on August 23, 2026 at 15:07 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade justhtml to version 1.14.0 or newer, which removes the mutation XSS flaw.
  • If an upgrade cannot be performed immediately, configure the sanitization policy to drop foreign namespaces (set drop_foreign_namespaces=True) and avoid permitting raw‑text containers such as <style> or allowing SVG/MathML elements while preserving them.
  • As a temporary defensive measure, use the default safe configuration (sanitize=True) which is unaffected by this vulnerability.

Generated by OpenCVE AI on August 23, 2026 at 15:07 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 24 Aug 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sun, 23 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Emilstenstrom
Emilstenstrom justhtml
Vendors & Products Emilstenstrom
Emilstenstrom justhtml

Sun, 23 Aug 2026 14:00:00 +0000

Type Values Removed Values Added
Description justhtml versions 1.13.0 and earlier contain a parser-differential / mutation cross-site scripting (mXSS) vulnerability when using a custom SanitizationPolicy that preserves foreign namespaces (e.g., drop_foreign_namespaces=False with allowlisted SVG/MathML elements or raw-text containers such as <style>). Specially crafted input can sanitize into markup that appears safe but becomes unsafe when re-parsed by a browser or another HTML parser, allowing markup injection. The default safe configuration (sanitize=True) is not affected. Fixed in 1.14.0.
Title justhtml before 1.14.0 Mutation XSS via custom sanitization policies
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

cvssV4_0

{'score': 5.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N'}


Subscriptions

Emilstenstrom Justhtml
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-24T19:03:33.747Z

Reserved: 2026-04-07T15:54:18.686Z

Link: CVE-2026-5751

cve-icon Vulnrichment

Updated: 2026-08-24T19:03:30.684Z

cve-icon NVD

Status : Deferred

Published: 2026-08-23T14:16:53.807

Modified: 2026-08-26T17:10:53.700

Link: CVE-2026-5751

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-23T16:39:44Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')