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

- Severity: High 8.7 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 28% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-17T14:07:38.000Z
- Modified: 2026-10-12T16:10:00.220Z
- Also known as: GHSA-v7cf-c9rm-wm3j, PYSEC-2026-3854
- Weaknesses: CWE-674
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- EmilStenstrom justhtml: before 1.10.0 (not affected: 1.10.0)
- justhtml (PyPI): before 1.10.0

## Every score

- VulnCheck: CVSS:4.0 8.7 High `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`
- VulnCheck: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`

## References

- <https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-v7cf-c9rm-wm3j> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/justhtml-before-denial-of-service-via-deeply-nested-html> (third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-9769> (advisory)
- <https://github.com/EmilStenstrom/justhtml> (package)
- <https://github.com/EmilStenstrom/justhtml/releases/tag/v1.10.0> (web)
- <https://pypi.org/project/justhtml> (package)
- <https://github.com/advisories/GHSA-v7cf-c9rm-wm3j> (advisory)

## Sources

- CVE List: [CVE-2026-9769](https://www.cve.org/CVERecord?id=CVE-2026-9769), CVE Terms of Use, modified 2026-08-24
- GitHub Advisory Database: [GHSA-v7cf-c9rm-wm3j](https://github.com/advisories/GHSA-v7cf-c9rm-wm3j), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-9769](https://nvd.nist.gov/vuln/detail/CVE-2026-9769), Public domain, modified 2026-10-12
- PyPA Advisory Database: [PYSEC-2026-3854](https://osv.dev/vulnerability/PYSEC-2026-3854), CC-BY-4.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2026-9769 · Whole record: https://cve.day/CVE-2026-9769.json · Rebuilt by cve.day 2026-11-25T22:59:34.971Z
