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

Published Aug 23, 2026
·
Updated

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 populateselectedcontent(), which recursively traverses the DOM tree via findelements()/findelement() 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.

Affected Software

1 affected component
justhtml<1.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade justhtml to a version that resolves this vulnerability.

    Fixed in 1.10.0

Event History

Aug 23, 2026
CVE Published
via MITRE·01:34 PM
Data Sourced
via MITRE·01:34 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:16 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this denial-of-service condition?

Applications using justhtml through 1.9.1 are exposed if they parse HTML that an attacker can supply. The attacker does not need privileges or user interaction; network-reachable applications are affected when attacker-controlled HTML reaches JustHTML() construction.

2

What does an attacker need to send to trigger the issue?

The attacker needs to provide deeply nested HTML elements for parsing. Around 1,000 nested div elements, approximately 11 KB of HTML, can exceed CPython's default recursion limit and cause an unhandled RecursionError.

3

Are all affected parsing deployments equally impacted?

The parsing failure occurs when construction reaches TreeBuilder.finish() and recursively traverses the DOM without a depth bound. The resulting operational impact depends on the host application's exception handling: parsing may fail, requests may fail, or a worker or process may terminate.

4

What should be done if updating is not immediately possible?

Ensure untrusted HTML cannot reach the affected parser, or enforce a maximum nesting depth before parsing. The vulnerable behavior is fixed in justhtml 1.10.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203