Description
justhtml before 1.16.0 contains multiple HTML sanitization bypass issues that can allow active/dangerous content (e.g., script or style) to survive sanitization, potentially leading to cross-site scripting. The issues primarily affect advanced usage rather than the default JustHTML(..., sanitize=True) path for ordinary parsed HTML: mutating or reusing sanitization policy objects (including exported defaults) could weaken later sanitization; programmatic DOM input to sanitize()/sanitize_dom() could miss mixed-case tag names (e.g., ScRiPt, StYlE); crafted programmatic doctype names could serialize into active markup; and custom policies preserving SVG or MathML could allow animation elements, presentation attributes with external url(...) references, or DOM trees mislabeled as namespace="html" to bypass foreign-content checks. Fixed in 1.16.0.
Published: 2026-08-23
Score: 9.3 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Cross‑Site Scripting via injected JavaScript
Action: Immediate Patch
AI Analysis

Impact

justhtml before version 1.16.0 contains multiple sanitization bypass bugs that allow active or dangerous HTML, such as <script> or <style> elements, to remain in the sanitized output. These flaws stem from insufficient input validation (CWE‑20) and are limited to the content that the library processes. The result is client‑side script execution (cross‑site scripting) when a malicious payload is rendered in a browser, without providing the attacker with the to execute arbitrary code on the server.

Affected Systems

Any environment that imports, renders, or stores user‑supplied HTML through justhtml on a release earlier than 1.16.0 is affected. This includes web applications, content management systems, or services that depend on justhtml for escaping or sanitizing HTML prior to display.

Risk and Exploitability

The CVSS score of 9.3 marks the issue as critical. With no EPSS score reported and the vulnerability not listed in the CISA KEV catalog, the public exploit evidence is low but the attack surface remains high for applications that allow untrusted input and use advanced policy features. An attacker that can control the data passed to JustHTML can craft HTML that bypasses mixed‑case tag checks, manipulated doctype handling, or custom SVG/MathML policies to inject malicious scripts, resulting in a cross‑site scripting event for the end user.

Generated by OpenCVE AI on August 23, 2026 at 16:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade justhtml to version 1.16.0 or later to apply the corrected sanitization logic.
  • If an upgrade cannot be performed immediately, restrict the library to its default sanitize=True mode and avoid using custom sanitization policy objects, high‑risk tags, or custom doctypes. Ensure all user input is validated before being given to JustHTML.
  • Deploy a browser‑side Content Security Policy that blocks inline script execution and limits external resources on pages that embed untrusted HTML to reduce the impact if the vulnerability is exploited.

Generated by OpenCVE AI on August 23, 2026 at 16:20 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': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, '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.16.0 contains multiple HTML sanitization bypass issues that can allow active/dangerous content (e.g., script or style) to survive sanitization, potentially leading to cross-site scripting. The issues primarily affect advanced usage rather than the default JustHTML(..., sanitize=True) path for ordinary parsed HTML: mutating or reusing sanitization policy objects (including exported defaults) could weaken later sanitization; programmatic DOM input to sanitize()/sanitize_dom() could miss mixed-case tag names (e.g., ScRiPt, StYlE); crafted programmatic doctype names could serialize into active markup; and custom policies preserving SVG or MathML could allow animation elements, presentation attributes with external url(...) references, or DOM trees mislabeled as namespace="html" to bypass foreign-content checks. Fixed in 1.16.0.
Title justhtml before 1.16.0 Multiple Security Issues via Sanitization
Weaknesses CWE-20
References
Metrics cvssV3_1

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

cvssV4_0

{'score': 9.3, 'vector': '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'}


Subscriptions

Emilstenstrom Justhtml
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-24T18:14:27.467Z

Reserved: 2026-05-04T21:13:37.078Z

Link: CVE-2026-7808

cve-icon Vulnrichment

Updated: 2026-08-24T18:14:22.051Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-7808

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-20

    Improper Input Validation