NLTK WordNet methods vulnerable to denial-of-service through uncontrolled recursion
- NLTK
- WordNet
- denial of service
- recursion
- corpus

Four hypernym-walking methods lacked recursion limits
Malicious corpus files could trigger process crashes
The advisory reports versions through 3.10.3 affected and no fix released
The NLTK project has a denial-of-service vulnerability in four WordNet hypernym-walking methods in releases through 3.10.3. The methods—max_depth, min_depth, hypernym_paths and hypernym_distances—can recurse without stopping when a loaded corpus contains a cyclic or excessively deep hypernym graph.
WordNet is a lexical database whose corpus files contain links between word meanings, including hypernym links that express broader categories. The affected methods follow those links without tracking visited nodes or imposing a depth limit. A crafted corpus can therefore trigger an uncaught RecursionError when an application calls one of the methods.
The failure can terminate the current traversal and any request or worker process that does not catch the error, affecting availability. The supplied advisory identifies releases through 3.10.3 as affected and says no fix had been released; it does not provide a patched version.
Key terms explained
- Denial-of-service
A denial-of-service attack prevents authorized users from accessing resources or delays critical system operations.
Think of it this way. This is like a store entrance being blocked by a crowd of people who have no intention of shopping, preventing actual customers from entering.
- WordNet
WordNet is a lexical database that organizes words into groups of synonyms called synsets and defines the relationships between them.




