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 CCG lexicon parser's matchBrackets and augParseCategory functions recursively process nested parenthesized categories without a depth bound. An attacker-controlled lexicon string with excessive nesting can raise RecursionError through nltk.ccg.lexicon.fromstring and terminate the parse operation or request worker. This issue is fixed in version 3.10.4.
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, ToolboxSettings.parse builds a deeply nested attacker-controlled settings tree iteratively, but the later public helpers to_settings_string, remove_blanks, add_default_fields, sort_fields, and add_blank_lines recursively traverse that tree without a depth bound. Invoking any of those helpers on input nested beyond the interpreter recursion limit can raise RecursionError and abort the operation or request worker. This issue is fixed in version 3.10.4.
NLTK versions from 3.9.4 up to but not including 3.10.4 contain a vulnerability where corpus-reader path pointers and view methods do not consistently resolve intermediate directory symlinks within the reader's scoped root. This allows a local attacker who can create such symlinks to access and disclose files outside the intended corpus root. The issue is fixed in version 3.10.4, which enforces path security to restrict file access within a global allowed root.
NLTK versions prior to 3.10.4 contain an uncontrolled recursion vulnerability in the WordNet Synset.tree and acyclic_tree functions. These functions traverse relation graphs recursively without a depth limit, which can lead to exceeding Python's recursion limit and crashing the process. Exploitation requires loading a maliciously crafted WordNet-format lexical resource, as the default NLTK WordNet corpus does not trigger this issue. The vulnerability is fixed in version 3.10.4.
A path traversal vulnerability exists in NLTK versions 3.9.4 through 3.10.3 during ZIP package extraction. An attacker with local access can exploit a hardlink within the extraction target to overwrite files outside the intended data root, compromising integrity and availability. This issue is resolved in version 3.10.4.
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.3 until 3.10.4, the NLTK 3.10.3 JVM hardening validates Java launcher tokens in the options channel but appends the caller-controlled cmd sequence without requiring its first token to be a main class. Supplying -jar or an @argfile through nltk.internals.java or StanfordSegmenter.java_class can therefore execute attacker-selected Java bytecode without the unsafe-JAR opt-in. This issue is fixed in version 3.10.4.
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.0 until 3.10.4, allowlisted_pickle_load keys dangerous NumPy globals by export name, allowing submodule-local numpy.lib file input/output callables to evade the denylist under the broad module allowance used by TransitionParser. A crafted pickle can invoke recfromtxt to read a local file or open_memmap to create or truncate an attacker-selected file when a victim loads an untrusted model. This issue is fixed in version 3.10.4.
NLTK versions prior to 3.10.4 contain an uncontrolled recursion vulnerability in the Tree.fromlist function. This function recursively converts nested Python lists into Tree objects without limiting recursion depth, allowing an attacker to cause a RecursionError by providing deeply nested lists. This can terminate the current parse operation or request worker, resulting in a denial of service. The issue is fixed in version 3.10.4.
NLTK versions from 3.6 up to but not including 3.10.4 contain a vulnerability in the XMLCorpusView._read_xml_fragment function. This flaw causes quadratic CPU consumption when processing large comments or CDATA sections in attacker-controlled XML corpus files, leading to uncontrolled resource consumption. The issue is fixed in version 3.10.4.
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 read_type parser recursively processes both halves of nested complex type strings without applying LogicParser.MAX_PARSE_DEPTH. 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.
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, WordNet Synset.max_depth, min_depth, hypernym_paths, and hypernym_distances recursively follow attacker-controlled corpus pointers without a visited-node set or depth cap. A cyclic or excessively deep hypernym graph can raise RecursionError and terminate traversal APIs and similarity operations that depend on them. This issue is fixed in version 3.10.4.
NLTK versions prior to 3.10.4 contain an uncontrolled recursion vulnerability in the DependencyGraph.tree and DependencyGraph.triples methods. These methods traverse parsed dependency edges using unbounded recursion without cycle or depth guards. A crafted dependency file with a sufficiently long chain can cause a RecursionError, aborting the current worker process. This issue is fixed in version 3.10.4.
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.6.7 until 3.10.4, nltk.downloader follows collection membership without tracking already visited collection nodes. A self-referencing or mutually referencing collection index can therefore make the package-closure walk loop indefinitely while its queue and memory usage grow, denying service when a victim processes the attacker-influenced index. This issue is fixed in version 3.10.4.
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. In 3.10.3 and earlier, DependencyGraph._tree and triples recurse once per dependency edge without a depth bound, and get_cycle_path also lacks a visited-set termination guard. A deeply chained or cyclic attacker-controlled CoNLL or Malt-TAB dependency structure can raise RecursionError and abort a parse worker. This issue is fixed in version 3.10.4.
NLTK versions from 3.10.0 up to but not including 3.10.4 contain an uncontrolled resource consumption vulnerability. This flaw arises from the handling of caller-controlled regular expressions with many capturing groups in TokenSearcher.findall, Text.findall, nltk.redos.compile, and RegexpTokenizer, leading to excessive CPU usage. The issue is fixed in version 3.10.4.
NLTK versions from 3.10.0 up to but not including 3.10.4 contain a vulnerability where the StreamBackedCorpusView component performs os.stat on a user-supplied file path before enforcing path containment. This can allow an attacker to disclose the existence, size, and modification time of files outside the intended directory, even though file opening is prevented. The issue is fixed in version 3.10.4.
NLTK versions prior to 3.10.4 contain a vulnerability in the SeekableUnicodeStreamReader.readline function where processing an attacker-controlled corpus file with a very long unterminated line causes quadratic CPU consumption. This can lead to denial of service by exhausting CPU resources. The issue is fixed in version 3.10.4.
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, nltk.classify.weka.ARFF_Formatter writes attacker-controlled class labels into the Weka ARFF @ATTRIBUTE '-label-' declaration without safely formatting the label tokens. Crafted labels can alter the generated ARFF schema or records, corrupting classifier input and causing integrity loss or processing failure. This issue is fixed in version 3.10.4.
NLTK versions prior to 3.10.4 contain an untrusted search path vulnerability in the Prover9Parent.config_prover9 and Mace components. These functions accept a relative binary location and pass it to find_binary without enforcing absolute paths, allowing a local attacker to place malicious binaries named prover9 or mace4 in the working directory. This can lead to execution of these binaries with the invoking user's privileges. The issue is resolved in NLTK version 3.10.4.
NLTK versions prior to 3.10.4 contain a vulnerability in the XMLCorpusView.read_block function where processing deeply nested XML corpora causes excessive resource consumption. This leads to quadratic computational work in pure Python, potentially pinning a processing worker and resulting in denial of service. The issue is fixed in version 3.10.4.