English version →
Webアプリケーション
CVE-2026-9769 high CVSS 7.5

Uncontrolled recursion DoS in JustHTML() via deeply nested HTML

概要

Uncontrolled recursion DoS in JustHTML() via deeply nested HTML

原文の説明

取得元が公開している説明をそのまま載せています (多くは英語)。

Summary

justhtml through 1.9.1 allows denial of service via deeply nested HTML. During parsing, JustHTML.__init__() always reaches TreeBuilder.finish(), which unconditionally calls _populate_selectedcontent(). That function recursively traverses the DOM via _find_elements() / _find_element() without a depth bound, allowing attacker-controlled deeply nested input to trigger an unhandled RecursionError on CPython. Depending on the host application's exception handling, this can abort parsing, fail requests, or terminate a worker/process.

Details

TreeBuilder.finish() (treebuilder.py#L476) unconditionally calls _populate_selectedcontent(self.document) at line 494. _populate_selectedcontent() (treebuilder.py#L1243) calls _find_elements() (treebuilder.py#L1280) to recursively search the DOM tree for `` elements:

def _find_elements(self, node: Any, name: str, result: list[Any]) -> None:
    """Recursively find all elements with given name."""…

出典: NIST National Vulnerability Database NVD GitHub Advisory

AI要約

外部の AI が作成した要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

justhtmlの1.9.1以前のバージョンには、制御されない再帰によるサービス拒否の脆弱性があります。HTML解析中に深くネストされた要素を提供することで、CPythonのデフォルトの再帰制限を超えるとRecursionErrorが発生し、アプリケーションの処理が中断する可能性があります。

❓ 何が問題か

justhtmlは制御されない再帰によりサービス拒否を引き起こす脆弱性があります。

📍 影響範囲

バージョン1.9.1までのjusthtml

🔥 重要度

攻撃者がHTMLを解析する際に深くネストされた要素を提供できると、RecursionErrorが発生し、サービス拒否状態になる可能性があります。

🔧 修正方法

バージョン1.10.0にアップデートすることで問題が修正されます。

🛡️ 暫定回避

情報なし

🔍 検知方法

深くネストされたHTMLを提供するテストを実行し、アプリケーションが予期せず終了するかどうか確認します。

影響パッケージ

pip justhtml
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.10.0"}]}]

参照URL

当サイトでは、アクセス解析と広告の効果測定のために Cookie を使います。株式会社Game のサイト共通の設定です。 詳しく