Description
justhtml before 1.17.0 contains multiple security issues in sanitization, serialization, and programmatic DOM handling. When custom policies preserve foreign namespaces (SVG/MathML), dangerous content such as HTML integration points (SVG <foreignObject>, MathML <annotation-xml encoding="text/html">) and mutation-XSS parser-differential payloads could survive sanitization and become active HTML after reparse; SVG filter="url(...)" and preserved <style> could leave resource-loading CSS (@import, background-image:url()). Programmatic script/style/Comment nodes could serialize into active markup. Additional hardening fixes address sanitize-pipeline cache mutation and DOM parent/child cycles that could cause infinite loops. Most issues affect advanced or custom configurations rather than the default JustHTML(..., sanitize=True) safe path.
Published: 2026-08-23
Score: 5.1 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Cross‑Site Scripting (arbitrary HTML or JavaScript injection)
Action: Upgrade
AI Analysis

Impact

justhtml versions before 1.17.0 contain multiple flaws in how the library sanitizes and serializes markup. Custom policies that preserve foreign namespaces such as SVG’s <foreignObject> or MathML’s <annotation‑xml encoding="text/html"> allow dangerous content to bypass the sanitizer, survive a reparse, and become active HTML. The library also serializes script, style, and comment nodes into active markup, and additional hardening fixes address issues that could lead to infinite loops. These weaknesses, classified as CWE‑79, enable attackers to inject executable code into a page that uses justhtml for rendering user input.

Affected Systems

The vulnerability affects all versions of justhtml prior to 1.17.0 released by EmilStenstrom. The default usage path JustHTML(..., sanitize=True) is intended to be safe, while advanced or custom configurations are more likely to be affected.

Risk and Exploitability

The CVSS score is 5.1, indicating moderate severity. EPSS data is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting the risk of known exploitation is currently uncertain. Nonetheless, the impact can be significant if an attacker injects malicious content and the application consumes it under a custom policy that preserves foreign namespaces. The attack vector is primarily through crafted input that the application processes with justhtml. Reducing or removing those custom policy features mitigates the risk.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade justhtml to version 1.17.0 or later to apply all fix patches for XSS vulnerabilities
  • If an upgrade is not immediately possible, configure justhtml to disable preservation of foreign namespaces such as SVG<foreignObject> and MathML<annotation-xml> within custom policies
  • Re‑enable or enforce the default JustHTML(..., sanitize=True) usage to avoid the advanced configuration paths that allow harmful content

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 26 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 before 1.17.0 contains multiple security issues in sanitization, serialization, and programmatic DOM handling. When custom policies preserve foreign namespaces (SVG/MathML), dangerous content such as HTML integration points (SVG <foreignObject>, MathML <annotation-xml encoding="text/html">) and mutation-XSS parser-differential payloads could survive sanitization and become active HTML after reparse; SVG filter="url(...)" and preserved <style> could leave resource-loading CSS (@import, background-image:url()). Programmatic script/style/Comment nodes could serialize into active markup. Additional hardening fixes address sanitize-pipeline cache mutation and DOM parent/child cycles that could cause infinite loops. Most issues affect advanced or custom configurations rather than the default JustHTML(..., sanitize=True) safe path.
Title justhtml before 1.17.0 Multiple Cross-Site Scripting Vulnerabilities
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-29T11:47:34.707Z

Reserved: 2026-04-21T20:44:33.519Z

Link: CVE-2026-6827

cve-icon Vulnrichment

Updated: 2026-08-26T18:06:04.081Z

cve-icon NVD

Status : Deferred

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

Modified: 2026-08-29T12:16:43.007

Link: CVE-2026-6827

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-79

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