---
id: CVE-2026-4671
title: >-
  justhtml before 1.18.0 contains multiple low-severity denial-of-service issues
  in CSS selector handling and linkification
summary: >-
  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 transfo…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-400
vendor: justhtml
product: justhtml
affected:
  - justhtml < 1.18.0
patched:
  - justhtml 1.18.0
published: '2026-08-23'
updated: '2026-10-12'
sourceUpdated: '2026-10-12T16:10:00.220'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-4671'
references:
  - url: >-
      https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r8cj-3554-33mr
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/justhtml-before-denial-of-service-via-css-selector
    label: disclosure@vulncheck.com
  - url: 'https://github.com/EmilStenstrom/justhtml'
tags:
  - nvd
  - osv
  - pip
epss: 0.00652
epssPercentile: 0.51014
aliases:
  - GHSA-r8cj-3554-33mr
ecosystem: pip
ingestedAt: '2026-08-24T19:25:44.327Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-4671)

Affected packages:

- `justhtml < 1.18.0`

Patched in:

- `justhtml 1.18.0`

Source: https://osv.dev/vulnerability/GHSA-r8cj-3554-33mr
