CVE-2026-80206: NLTK 3.10.2 Regular Expression Denial of Service via tgrep

Published Aug 26, 2026
·
Updated

NLTK before 3.10.3 contains a regular expression denial of service (ReDoS) vulnerability in the tgrep module. The tgrepnodeaction function compiles user-supplied regular expressions embedded in /regex/ pattern nodes and executes them via re.search against tree node labels without any validation or timeout. An attacker who controls the tgrep pattern (e.g., via tgreppositions() or tgrepcompile() exposed to external input) can supply a pattern that triggers catastrophic backtracking, causing indefinite CPU saturation that blocks the Python process.

Affected Software

1 affected component
pypi/nltk<3.10.3

Event History

Aug 26, 2026
CVE Published
via MITRE·10:28 AM
Data Sourced
via MITRE·10:28 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications using NLTK's tgrep functionality are exposed if untrusted users can influence tgrep patterns passed through interfaces such as tgrep_positions() or tgrep_compile(). The vulnerable path applies regular expressions from /regex/ pattern nodes to tree node labels.

2

What does an attacker need to exploit it?

An attacker needs the ability to provide or control a tgrep pattern containing a regular expression. No authentication or user interaction is required according to the supplied vector, but crafting a pattern that causes catastrophic backtracking has high attack complexity.

3

Are default deployments affected?

The provided information identifies exposure only where externally controlled input reaches tgrep pattern compilation or execution. It does not establish that a default NLTK deployment exposes such an input path.

4

What is the impact of successful exploitation?

A malicious regular expression can cause indefinite CPU saturation in the Python process while re.search evaluates it against tree node labels. This is an availability impact; no confidentiality or integrity impact is identified.

5

What can be done if upgrading is not immediately possible?

Do not allow untrusted parties to supply tgrep patterns, particularly /regex/ pattern nodes, to tgrep_positions() or tgrep_compile(). Restrict pattern inputs to trusted, validated values to prevent attacker-controlled expressions from reaching re.search.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203