CVE-2026-129226: NLTK: Uncontrolled recursion in semantic-logic type parser causes denial of service via nested type strings
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Prior to 3.10.4, the semantic-logic readtype parser recursively processes both halves of nested complex type strings without applying LogicParser.MAXPARSEDEPTH. An attacker-controlled type string or signature with excessive nesting can raise RecursionError through Type.fromstring or type-checking entry points and abort the current worker. This issue is fixed in version 3.10.4.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.10.4
Event History
Frequently Asked Questions
Which applications are exposed?
Applications using NLTK versions prior to 3.10.4 are exposed when attacker-controlled type strings or signatures can reach Type.fromstring or type-checking entry points.
What does an attacker need to supply?
The attacker needs to provide a type string or signature with excessive nested complex types. Exploitation does not require privileges or user interaction according to the supplied vector.
What is the operational impact of successful exploitation?
Processing the nested input can raise RecursionError and abort the current worker. The reported impact is denial of service rather than confidentiality or integrity loss.
How can this be remediated?
Update NLTK to version 3.10.4, which fixes the missing parse-depth handling.