脆弱性ウォッチ

新着 / 2026年11月26日 / CVE-2026-135804

JsonCrawler(PHP)の JSONPath 処理におけるサービス拒否の脆弱性

重要 7.5

掲載

何が問題か

JsonCrawler の JSONPath 評価で、正規表現処理とフィルタ式の評価に計算量の制限が不十分な問題があります。CVE-2026-45756 の修正は pcre.backtrack_limit を各 preg_match() 呼び出しに適用していましたが、この上限は開始位置ごとのものであり、入力長に比例して処理が増えるケースがあります。また正規表現を使わない経路でも、フィルタ式の論理演算子走査や $ で始まるクエリの再評価により、式のサイズに対して処理量が急増することが説明されています。修正版では find() 呼び出し単位で正規表現処理の総量を制限し、上限に達すると例外を送出します。

悪用されると

攻撃者が影響を与えられるJSONPath式を評価させると、PHPのワーカープロセスがCPUを長時間占有し、サービス拒否の状態になるおそれがあります。説明では、2MBの文書と2.5KBの式で約3分半のCPU時間を要する例が示されています。機密性や完全性への影響は記載されていません。

取るべき対応

JsonCrawler を利用しているアプリケーションの有無と版を確認し、修正版への更新を検討してください。修正版の番号はJSONに記載がないため、公表されていません。外部から受け取ったJSONPath式を評価する機能がある場合は、修正適用までの間、式の入力制限や実行時間の監視を検討してください。

AIが出典から要約し、数値を機械照合しています。

更新履歴

  1. 初回掲載。

指標

深刻度(CVSS v3.1)重要 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
実際の攻撃での悪用CISA KEVには未掲載
30日以内に悪用される確率(EPSS)0.3%(全体の上位 87.3%)
問題の種類CWE-400、CWE-407、CWE-1333
CVE公開日2026-11-24

出典

公式の説明(英語の原文)

The fix for CVE-2026-45756 lowers pcre.backtrack_limit to 10000 around each preg_match() call of the match() and search() filter functions. That limit applies to one starting position, not to one call. PCRE resets its counter at every position it tries a match from. So an unanchored pattern that stays just under the limit is paid once per byte of the subject. Each call also starts from a fresh limit, so chaining clauses in one filter multiplies the work. Two other paths made the cost of a query grow faster than its size, without any regular expression: - The filter evaluator scanned the whole expression for logical operators once per node. Its cost grew with the square of the number of chained clauses. - Queries starting with $ inside a filter, like @.x == $.limit or length($.items), were evaluated again for every node the filter visits. An application that evaluates an attacker-influenced JSONPath expression can therefore still be made to hold a PHP worker. A document of 2 MB and a query of 2.5 KB take 3.5 minutes of CPU. JsonCrawler::find() now bounds the total regex work of one call, and throws an exception when that budget is exhausted. Filter expressions are parsed once per query, and absolute queries inside filters are evaluated once per query.