AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
justhtml の 1.10.0 より前のバージョンには、深くネストされたHTMLを解析させると再帰処理が上限を超えて例外で停止し、サービス拒否の状態になる問題があります。影響を受けるのは 1.9.1 までの版で、修正版の 1.10.0 以降へ更新してください。
justhtmlは制御されない再帰によりサービス拒否を引き起こす脆弱性があります。
バージョン1.9.1までのjusthtml
攻撃者がHTMLを解析する際に深くネストされた要素を提供できると、RecursionErrorが発生し、サービス拒否状態になる可能性があります。
バージョン1.10.0にアップデートすることで問題が修正されます。
情報なし
深くネストされたHTMLを提供するテストを実行し、アプリケーションが予期せず終了するかどうか確認します。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| pipjusthtml |
< 1.10.0→ 1.10.0 |
1.10.0 |
Original description The description as published by the source.
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 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.
Source: NIST National Vulnerability Database NVD GitHub Advisory
References
- advisory github.com
- advisory vulncheck.com
- advisory nvd.nist.gov
- advisory github.com
- web github.com
- web github.com
- web github.com