Gptline: NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions (CVE-2026-80206)
The NLTK tgrep module suffers from a Regular Expression Denial of Service (ReDoS) vulnerability due to unvalidated user-supplied regex patterns compiled without timeout. This allows an attacker to cause catastrophic backtracking, leading to indefinite CPU consumption and denial of service in applications exposing the tgrep API to external input. The vulnerability affects NLTK versions up to 3.10.2 and has been confirmed with proof-of-concept code demonstrating exponential runtime growth. A patch is available to mitigate this issue.
AI Analysis
Technical Summary
The NLTK tgrep module accepts user-supplied regular expressions and compiles them directly with Python's re engine without validation or timeout, enabling catastrophic backtracking (ReDoS). Specifically, the function _tgrep_node_action compiles regex literals embedded in tgrep patterns without safeguards. This allows crafted regexes such as /((a+)+)b/ to cause exponential runtime when matched against certain tree node labels, leading to indefinite blocking of the Python process. The vulnerability is confirmed with proof-of-concept scripts showing exponential execution time growth on NLTK 3.10.2. The issue affects versions <= 3.10.2 and remains unfixed in those versions. Maintainers are working on a patch to add timeout-guarded regex execution.
Potential Impact
An unauthenticated attacker can exploit this vulnerability by submitting a single crafted regex pattern to the tgrep API, causing indefinite CPU saturation and denial of service. This impacts any environment exposing tgrep to external input, including web APIs, Jupyter notebooks, and multi-tenant pipelines, effectively blocking all other users of the affected Python process.
Mitigation Recommendations
A patch is available to address this vulnerability by wrapping regex execution in a timeout-guarded mechanism. Users should upgrade to the fixed version once released. Until then, avoid exposing the tgrep API to untrusted input or implement external request timeouts to mitigate potential denial of service.
Gptline: NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions (CVE-2026-80206)
Description
The NLTK tgrep module suffers from a Regular Expression Denial of Service (ReDoS) vulnerability due to unvalidated user-supplied regex patterns compiled without timeout. This allows an attacker to cause catastrophic backtracking, leading to indefinite CPU consumption and denial of service in applications exposing the tgrep API to external input. The vulnerability affects NLTK versions up to 3.10.2 and has been confirmed with proof-of-concept code demonstrating exponential runtime growth. A patch is available to mitigate this issue.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The NLTK tgrep module accepts user-supplied regular expressions and compiles them directly with Python's re engine without validation or timeout, enabling catastrophic backtracking (ReDoS). Specifically, the function _tgrep_node_action compiles regex literals embedded in tgrep patterns without safeguards. This allows crafted regexes such as /((a+)+)b/ to cause exponential runtime when matched against certain tree node labels, leading to indefinite blocking of the Python process. The vulnerability is confirmed with proof-of-concept scripts showing exponential execution time growth on NLTK 3.10.2. The issue affects versions <= 3.10.2 and remains unfixed in those versions. Maintainers are working on a patch to add timeout-guarded regex execution.
Potential Impact
An unauthenticated attacker can exploit this vulnerability by submitting a single crafted regex pattern to the tgrep API, causing indefinite CPU saturation and denial of service. This impacts any environment exposing tgrep to external input, including web APIs, Jupyter notebooks, and multi-tenant pipelines, effectively blocking all other users of the affected Python process.
Mitigation Recommendations
A patch is available to address this vulnerability by wrapping regex execution in a timeout-guarded mechanism. Users should upgrade to the fixed version once released. Until then, avoid exposing the tgrep API to untrusted input or implement external request timeouts to mitigate potential denial of service.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- BREW-gptline-CVE-2026-80206
- Osv Schema Version
- 1.7.3
- Ecosystems
- ["Homebrew"]
- Cvss Version
- 4.0
Threat ID: 6aac8e5a55bf5e2cf5491af5
Added to database: 09/18/2026, 01:05:30 UTC
Last enriched: 09/18/2026, 01:51:14 UTC
Last updated: 09/18/2026, 02:07:10 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.