Description
justhtml before 1.18.0 contains multiple low-severity denial-of-service issues in CSS selector handling and linkification. Applications that evaluate attacker-controlled selector strings (via query(), matches(), or selector-based transforms), run selector matching over very large untrusted documents, construct DOM trees from untrusted structure, or enable linkification over attacker-controlled text may consume disproportionate CPU or memory. Triggers include oversized selectors, large selector lists, oversized compound selectors, long combinator chains, deeply nested functional pseudo-classes, repeated token/positional matching, cyclic DOM graphs causing non-terminating traversal, and punctuation-heavy or trailing-bracket linkification input. These are availability-only concerns and do not by themselves allow script execution, data disclosure, or sanitizer bypass. Default JustHTML(sanitize=True) usage is not expected to be exposed, since selectors are normally supplied by application code.
Published: 2026-08-23
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service
Action: Immediate Patch
AI Analysis

Impact

justhtml before version 1.18.0 contains multiple denial‑of‑service issues in its CSS selector handling and linkification code. The library permits applications to evaluate attacker‑controlled selector strings through methods such as query(), matches(), or selector‑based transforms, and to run selector matching over very large untrusted documents or construct DOM trees from untrusted structures. Large or complex selector inputs—including oversized selectors, long combinator chains, deeply nested functional pseudo‑classes, or cyclic DOM graphs—can cause the library to consume excessive CPU or memory. Other triggers are punctuation‑heavy or trailing-bracket linkification input. These conditions are availability‑only concerns and do not enable script execution, data disclosure, or sanitizer bypass. The default JustHTML(sanitize=True) mode is expected to be applied only by application code, so the risk is limited to scenarios where the application passes untrusted selector strings or text to the library.

Affected Systems

Applications using EmilStenstrom’s justhtml library with a version prior to 1.18.0 are affected. The vulnerability is present in any deployment that processes untrusted selector strings or performs linkification on untrusted text using the vulnerable library.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity of denial of service. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, implying no confirmed exploits yet. The likely attack vector is an attacker supplying a malicious or overly large selector string or linkification input to a JustHTML instance; doing so can cause disproportionate resource consumption. The vulnerability does not affect confidentiality or integrity and does not provide code execution capability.

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

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade justhtml to version 1.18.0 or newer to apply the official fix.
  • Disallow untrusted selector input by limiting the usage of query(), matches(), and selector‑based transforms to trusted data only.
  • Implement input validation on selector strings and linkification text, setting maximum length and complexity thresholds to prevent excessive processing.
  • Monitor CPU and memory usage of JustHTML operations and apply rate limiting or graceful degradation if thresholds are exceeded.

Generated by OpenCVE AI on August 23, 2026 at 15:08 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': '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.18.0 contains multiple low-severity denial-of-service issues in CSS selector handling and linkification. Applications that evaluate attacker-controlled selector strings (via query(), matches(), or selector-based transforms), run selector matching over very large untrusted documents, construct DOM trees from untrusted structure, or enable linkification over attacker-controlled text may consume disproportionate CPU or memory. Triggers include oversized selectors, large selector lists, oversized compound selectors, long combinator chains, deeply nested functional pseudo-classes, repeated token/positional matching, cyclic DOM graphs causing non-terminating traversal, and punctuation-heavy or trailing-bracket linkification input. These are availability-only concerns and do not by themselves allow script execution, data disclosure, or sanitizer bypass. Default JustHTML(sanitize=True) usage is not expected to be exposed, since selectors are normally supplied by application code.
Title justhtml before 1.18.0 Denial of Service via CSS Selector
Weaknesses CWE-400
References
Metrics cvssV3_1

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

cvssV4_0

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


Subscriptions

Emilstenstrom Justhtml
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-24T18:09:57.316Z

Reserved: 2026-03-23T19:00:14.383Z

Link: CVE-2026-4671

cve-icon Vulnrichment

Updated: 2026-08-24T18:09:49.642Z

cve-icon NVD

Status : Deferred

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

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

Link: CVE-2026-4671

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

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

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption