NLTKに攻撃者が文法を操作してサービスを停止させられる脆弱性
概要
NLTKの3.10.4より前のバージョンには、SteppingRecursiveDescentParser.parse()で処理に上限がなく、CPUやワーカーを使い果たさせられる脆弱性(CVE-2026-126303)があります。攻撃者が文法を操作できる環境では、サービス停止につながるおそれがあります。修正版の3.10.4に更新してください。
AI要約
SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。
NLTKの3.10.4より前のバージョンには、SteppingRecursiveDescentParser.parse()で処理に上限がなく、CPUやワーカーを使い果たさせられる脆弱性(CVE-2026-126303)があります。攻撃者が文法を操作できる環境では、サービス停止につながるおそれがあります。修正版の3.10.4に更新してください。
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| nltknltk |
3.10.4 未満→ 3.10.4 |
3.10.4 |
| pipnltk |
3.10.4 未満→ 3.10.4 |
3.10.4 |
| PyPInltk |
3.10.4 未満→ 3.10.4 |
3.10.4 |
ディストリビューション別の修正状況
各ディストリビューションが公開している、この CVE の記録です。修正版は配布版ごとに違うので、リンク先で確かめてください。
- Debian DEBIAN-CVE-2026-126303 nltk この記録に修正版の記載なし
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
nltk.parse.recursivedescent.SteppingRecursiveDescentParser.parse() performs an unbounded top-down search over ambiguous or self-embedding context-free grammars with no wall-clock or step limit. An actor who can influence the grammar and supply a short input to a caller that uses this parser can force a single parse() call to pin a CPU core indefinitely, producing a denial of service. The related base class RecursiveDescentParser gained a max_time wall-clock deadline, but the stepping subclass drives its own step loop and never arms or consults that deadline, and its constructor does not accept a max_time parameter, so the guard cannot be enabled on this path.
Root Cause
RecursiveDescentParser bounds its recursive search inside _parse: it arms a wall-clock deadline on the first step and raises TimeoutError once max_time (default 5.0 seconds) is exceeded. SteppingRecursiveDescentParser was designed for interactive single-stepping and overrides both parse() and _parse. Its parse() runs initialize() followed by a while self.step() is not None loop that never enters the guarded base _parse. Its _parse override is a state-capturing stub that records history and returns a sentinel, and it never references the inherited self._parse_deadline or self._max_time. Its __init__ signature omits max_time entirely, so a caller cannot enable or tighten a bound. The security invariant that a single parse must terminate within a bounded…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- package github.com
- web github.com
- web vulncheck.com
- web nvd.nist.gov
- web github.com
- web github.com
- web github.com
- web github.com
- web github.com