HIGHCVSS v3.1 7.5Vulnerability

CVE-2026-129229

## Summary NLTK exposes a compile-time regular-expression denial of service in its regex-search helpers. When an application passes untrusted text as the search pattern to `TokenSearcher.findall()` / `Text.findall()`, or as the tokenizer pattern to `RegexpTokenizer`, the pattern is handed to the third-party `regex` engine, whose compilation cost is roughly quadratic in the number of capturing groups. A short pattern of the form `()` repeated many times (for example `"()" * 25000`, about 50 KB) forces tens of seconds of synchronous CPU work before any match begins. The wall-clock timeout that NLTK added to guard matching does not apply during compilation, so a single small request pins a CPU core, and repeated or concurrent requests exhaust all cores and deny service. ## Root Cause The remediation for the earlier match-time backtracking issue (advisory GHSA-rrv8-h7p8-rx55 / CVE-2026-80205) switched the caller-supplied-pattern search path from the standard library `re` module to the third-party `regex` engine and wrapped matching in a wall-clock timeout. That timeout is a match-time limit only: it is applied while the compiled pattern scans the corpus. Compilation of the pattern happens first and synchronously, outside any timeout. The `regex` engine's compiler is approximately O(n^2) in the number of regex groups, so a caller-controlled pattern consisting of many empty groups makes compilation, not matching, the expensive step. No control bounds the group count of a caller-supplied pattern before compilation. ```text Affected components / functions: - nltk.text.TokenSearcher.findall (nltk/text.py) -> regex.findall(pattern, corpus, timeout=...) On released 3.10.0-3.10.2 this sink calls regex.findall directly; on 3.10.3 and later it routes through nltk.redos.compile. Either way the regex engine compiles the caller pattern with no group-count bound, and the timeout guards only matching. - nltk.redos.compile (nltk/redos.py, introduced in 3.10.3) -> re

Properties

Summary
NLTK: Compile-time regex DoS in NLTK search/tokenizer sinks: quadratic regex-engine compile bypasses the match-only timeout
Severity
high
Nvd fetched at
2026-11-22T12:30:49.958423+00:00
Epss score
0.00527
Cvss score
7.5
Cvss severity
HIGH
Retrieved at
2026-11-22T12:32:26+00:00
Ghsa published
2026-11-19T23:50:03Z
Source url
https://github.com/advisories/GHSA-32p6-cwhc-8r78
Ghsa updated
2026-11-19T23:50:05Z
Ghsa id
GHSA-32p6-cwhc-8r78
Last source
FIRST EPSS
Score
7.5
Cvss version
3.1
Cve id
CVE-2026-129229
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
First seen by Signal
2026-11-19T19:29:21+00:00
Name
CVE-2026-129229
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Related Entities (4)

AFFECTS (1)

→[Software]pip/nltk

VULNERABLE_TO (1)

←[Software]pip/nltk

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-129229 (CVSS v3.1 7.5) — Ninja Signal Threat Intelligence | Ninja Signal