nltk
PyPI49 known CVEs affecting this package
Aggregated from OSV, GitHub Security Advisories, NVD, and vendor advisories. Each CVE links to its full detail page with vendor advisories, patches, fixed versions, and remediation guidance.
CVEs affecting nltkpage 1 of 1
- CVE-2019-14751HIGHCVSS 7.5EG 7.5✓ Fixed in 3.4.52019-08-22
vulnerable: 2.0.1rc2-git ... 3.4.4 (45 versions)
NLTK Downloader before 3.4.5 is vulnerable to a directory traversal, allowing attackers to write arbitrary files via a ../ (dot dot slash) in an NLTK package (ZIP archive) that is mishandled during extraction.
- CVE-2021-3828HIGHCVSS 7.5EG 7.5✓ Fixed in 3.6.42021-09-27
vulnerable: 0.8 ... 3.6.3 (52 versions)
nltk is vulnerable to Inefficient Regular Expression Complexity
- CVE-2021-3842HIGHCVSS 7.5EG 7.5✓ Fixed in 3.6.62022-01-04
vulnerable: 0.8 ... 3.6.5 (54 versions)
nltk is vulnerable to Inefficient Regular Expression Complexity
- CVE-2021-43854HIGHCVSS 7.5EG 7.5✓ Fixed in 3.6.52021-12-23
vulnerable: 0.8 ... 3.6.4 (53 versions)
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. Versions prior to 3.6.5 are vulnerable to regular expression denial of s…
- CVE-2024-39705CRITICALCVSS 9.8EG 9.8✓ Fixed in 3.92024-06-27
vulnerable: 0.8 ... 3.9b1 (60 versions)
NLTK through 3.8.1 allows remote code execution if untrusted packages have pickled Python code, and the integrated data package download functionality is used. This affects, for example, averaged_perceptron_tagger and punkt.
- CVE-2025-14009HIGHCVSS 8.8EG 8.8✓ Fixed in 3.9.32026-02-18
vulnerable: 0.8 ... 3.9b1 (63 versions)
A critical vulnerability exists in the NLTK downloader component of nltk/nltk, affecting all versions. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks. This all…
- CVE-2025-71408HIGHCVSS 7.8EG 7.8✓ Fixed in 3.9.32026-07-24
vulnerable: 0.8 ... 3.9b1 (63 versions)
NLTK (Natural Language Toolkit) before version 3.9.3 contains an eval injection vulnerability in the nltk.collocations module that allows an attacker who controls command-line arguments to execute arbitrary Python code. When collocations.p…
- CVE-2026-0846HIGHCVSS 7.5EG 7.5✓ Fixed in 3.9.32026-03-09
vulnerable: 0.8 ... 3.9b1 (63 versions)
A vulnerability in the `filestring()` function of the `nltk.util` module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitiza…
- CVE-2026-0847HIGHCVSS 7.5EG 8.6✓ Fixed in 3.9.32026-03-04
vulnerable: 0.8 ... 3.9b1 (63 versions)
A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail…
- CVE-2026-0848CRITICALCVSS 10.0EG 10.0✓ Fixed in 3.9.32026-03-05
vulnerable: 0.8 ... 3.9b1 (63 versions)
NLTK versions <=3.9.2 are vulnerable to arbitrary code execution due to improper input validation in the StanfordSegmenter module. The module dynamically loads external Java .jar files without verification or sandboxing. An attacker can su…
- CVE-2026-12061HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-07-31
vulnerable: 0.8 ... 3.9b1 (65 versions)
Natural Language Toolkit (NLTK): ReDoS in NLTK ReviewsCorpusReader FEATURES regex ### Summary `ReviewsCorpusReader` extracts feature annotations of the form *label* followed by a bracketed signed digit (e.g. a label then `[+2]`) from each…
- CVE-2026-12072HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-07-31
vulnerable: 0.8 ... 3.9b1 (65 versions)
Natural Language Toolkit (NLTK): Path Traversal in NKJPCorpusReader leads to Arbitrary File Read and bypasses the nltk.pathsec sandbox (ENFORCE=True) ### Summary A path-traversal vulnerability in `NKJPCorpusReader` allows an attacker w…
- CVE-2026-12074HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-07-31
vulnerable: 0.8 ... 3.9b1 (65 versions)
Natural Language Toolkit (NLTK) has path traversal in FramenetCorpusReader.frame() that allows arbitrary XML file read, bypassing the nltk.pathsec sandbox (ENFORCE=True) ### Summary `FramenetCorpusReader.frame(name)` interpolates a caller…
- CVE-2026-12075HIGHCVSS 8.6EG 8.6✓ Fixed in 3.10.02026-07-31
vulnerable: 0.8 ... 3.9b1 (65 versions)
Natural Language Toolkit (NLTK): DNS-rebinding SSRF filter bypass in nltk.pathsec.urlopen (nltk.download / nltk.data.load) defeats ENFORCE mode ### Summary `nltk.pathsec` provides an SSRF filter that NLTK documents as a security control, …
- CVE-2026-12252HIGHCVSS 7.8EG 7.8✓ Fixed in 3.9.42026-07-04
vulnerable: 0.8 ... 3.9b1 (64 versions)
In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable to untrusted JAR code execution. T…
- CVE-2026-12259MEDIUMCVSS 5.3EG 5.3✓ Fixed in 3.9.32026-08-03
vulnerable: 0.8 ... 3.9b1 (63 versions)
In nltk version 3.9.4, the `nltk.downloader.Downloader._download_package()` function writes downloaded package bytes to disk and may extract them before enforcing SHA-256 or MD5 checksum validation. This allows an attacker to tamper with t…
- CVE-2026-12876MEDIUMEG not assessed✓ Fixed in 3.10.32026-09-02
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars `nltk.parse.RecursiveDescentParser` (and `SteppingRecursiveDescentParser`) enumerate parses top-down with no bound on the number of…
- CVE-2026-33230MEDIUMCVSS 6.1EG 6.1✓ Fixed in 3.9.42026-03-20
vulnerable: 0.8 ... 3.9b1 (64 versions)
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 versions 3.9.3 and prior, `nltk.app.wordnet_app` contains a reflected…
- CVE-2026-33231HIGHCVSS 7.5EG 7.5✓ Fixed in 3.9.42026-03-20
vulnerable: 0.8 ... 3.9b1 (64 versions)
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 versions 3.9.3 and prior, `nltk.app.wordnet_app` allows unauthenticat…
- CVE-2026-33236HIGHCVSS 8.1EG 8.1✓ Fixed in 3.9.42026-03-20
vulnerable: 0.8 ... 3.9b1 (64 versions)
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 versions 3.9.3 and prior, the NLTK downloader does not validate the `…
- CVE-2026-54293HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-06-16
vulnerable: 0.8 ... 3.9b1 (65 versions)
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.0-rc1, nltk.data.load() in NLTK is vulnerable to path trav…
- CVE-2026-62383MEDIUMCVSS 5.5EG 5.5✓ Fixed in 3.10.22026-08-22
vulnerable: 3.10.0, 3.10.1
nltk versions before 3.10.2 contain a symlink-based arbitrary file read vulnerability in IPIPANCorpusReader methods that bypass nltk.pathsec validation entirely. Attackers can place a symlink in the corpus root directory and read arbitrary…
- CVE-2026-62384HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.22026-08-22
vulnerable: 3.10.0, 3.10.1
NLTK versions before 3.10.2 contain a symlink-based sandbox bypass in FramenetCorpusReader that allows attackers to read arbitrary XML files outside the corpus root. Attackers can place symlinks with names containing no path separators ins…
- CVE-2026-62385HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-08-22
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK versions before 3.10.0 contain a path traversal vulnerability in FramenetCorpusReader and NKJPCorpusReader that allows attackers to parse XML files outside the corpus root by supplying unsafe selectors or poisoned index state. Attacke…
- CVE-2026-62388HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-08-22
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK versions before 3.10.0 default to ENFORCE=False in pathsec.py, causing all security validation functions to emit warnings instead of raising exceptions. Attackers can bypass path traversal and pickle deserialization protections by exp…
- CVE-2026-63311MEDIUMCVSS 5.3EG 5.3✓ Fixed in 3.10.02026-08-22
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK before 3.10.0 (affected versions <= 3.9.4) contains a server-side request forgery (SSRF) vulnerability in the validate_network_url() function in nltk/pathsec.py. The _resolve_hostname() helper catches OSError and ValueError during soc…
- CVE-2026-63312HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-08-22
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK before 3.10.0 contains an arbitrary local file read vulnerability in StreamBackedCorpusView that bypasses pathsec.ENFORCE by calling builtins.open() directly instead of pathsec.open(). Attackers who control the fileid argument can rea…
- CVE-2026-65915MEDIUMCVSS 6.5EG 6.5✓ Fixed in 3.10.02026-08-22
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK versions before 3.10.0 contain a logic bug in FileSystemPathPointer.open() where the sandbox validation check compares a normalized path against itself, making the security check permanently inert. Attackers can pass file:// URLs to n…
- CVE-2026-66393HIGHCVSS 7.5EG 7.5✓ Fixed in 3.9.42026-08-22
vulnerable: 0.8 ... 3.9b1 (64 versions)
NLTK versions before 3.9.4 contain an unbounded recursion vulnerability in JSONTaggedDecoder.decode_obj() that allows attackers to cause denial of service by supplying deeply nested JSON structures. Attackers can craft JSON payloads exceed…
- CVE-2026-70626MEDIUMCVSS 6.2EG 6.2✓ Fixed in 3.9.42026-08-22
vulnerable: 0.8 ... 3.9b1 (64 versions)
NLTK versions before 3.9.4 contain a symlink escape vulnerability in CorpusReader.open() that allows local attackers to read arbitrary files outside the corpus root. The vulnerability exists because path validation is lexical and does not …
- CVE-2026-71513HIGHCVSS 8.8EG 8.8✓ Fixed in 3.10.32026-08-22
vulnerable: 3.10.0, 3.10.1, 3.10.2
NLTK before 3.10.3 contains a remote code execution vulnerability in AllowlistUnpickler that validates only the pickle module string and not the global name, allowing attackers to resolve dotted names by attribute traversal to callables ou…
- CVE-2026-71514LOWCVSS 3.3EG 3.3✓ Fixed in 3.10.32026-08-22
vulnerable: 3.10.0, 3.10.1, 3.10.2, 3.9.4
NLTK 3.9.4 through 3.10.2 contains a path traversal vulnerability in CrubadanCorpusReader. _load_lang_ngrams joins the corpus root with crubadan_code, the column-0 value read from the corpus table.txt mapping file, and opens the result wit…
- CVE-2026-72818HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.12026-08-20
vulnerable: 0.8 ... 3.9b1 (66 versions)
The URLS regular expression in nltk/tokenize/casual.py, compiled into TweetTokenizer.WORD_RE and applied by TweetTokenizer.tokenize, contains a naked-domain branch whose domain-label prefix [a-z0-9]+(?:[.\-][a-z0-9]+)* is unbounded. Input …
- CVE-2026-78680HIGHCVSS 7.8EG 7.8✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 fail to use validated absolute paths when invoking the Graphviz dot binary in dependencygraph.dot2img and AlignedSent._repr_svg_, allowing attackers to execute arbitrary code by placing a malicious dot binary in…
- CVE-2026-78681HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 use xml.etree.ElementTree to parse XML in multiple modules, which honors entity declarations in document DTDs. Attackers can craft XML payloads with nested entity declarations that expand from hundreds of bytes …
- CVE-2026-78682HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK before 3.10.3 contains a server-side request forgery vulnerability in nltk.pathsec.urlopen (and callers nltk.data.load, nltk.downloader.Downloader.index/download) when an HTTP proxy is configured. pathsec.urlopen validates the request…
- CVE-2026-78683CRITICALCVSS 9.6EG 9.6✓ Fixed in 3.10.02026-08-25
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK before 3.10.0 (affected versions <=3.9.4) contains an unsafe pickle deserialization vulnerability in the TransitionParser.parse() method (nltk/parse/transitionparser.py). The method calls pickle_load() with the default restricted=Fals…
- CVE-2026-79657CRITICALCVSS 9.8EG 9.8✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 contain a remote code execution vulnerability in allowlisted pickle loaders that trust entire module namespaces instead of specific safe callables. Attackers can craft malicious pickle payloads invoking dangerou…
- CVE-2026-79674HIGHCVSS 8.2EG 8.2✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpu…
- CVE-2026-79675CRITICALCVSS 9.8EG 9.8✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK before 3.10.3 fails to validate JVM options passed through the per-call options parameter in the java() function, allowing attackers to inject dangerous JVM flags. Attackers can supply malicious options like -agentpath, -javaagent, or…
- CVE-2026-79676MEDIUMCVSS 5.9EG 5.9✓ Fixed in 3.10.32026-08-25
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 contain a path traversal vulnerability in corpus readers that reopen root-derived paths using built-in open() instead of nltk.pathsec.open(), allowing symlinks to escape trusted roots. Attackers who stage symlin…
- CVE-2026-80205HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.02026-08-26
vulnerable: 0.8 ... 3.9b1 (65 versions)
NLTK versions before 3.10.0 contain a regular expression denial of service vulnerability in Text.findall() and TokenSearcher.findall() methods that accept user-supplied regular expressions without validation or timeout. Attackers can suppl…
- CVE-2026-80206MEDIUMCVSS 5.9EG 5.9✓ Fixed in 3.10.32026-08-26
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK before 3.10.3 contains a regular expression denial of service (ReDoS) vulnerability in the tgrep module. The _tgrep_node_action function compiles user-supplied regular expressions embedded in /regex/ pattern nodes and executes them vi…
- CVE-2026-81722HIGHCVSS 7.5EG 7.5✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
nltk PorterStemmer in versions <= 3.10.2 (fixed in 3.10.3) contains an inefficient-algorithmic-complexity denial of service in PorterStemmer.stem(). The _is_consonant() helper walks backward over the entire run of trailing 'y' characters o…
- CVE-2026-81723LOWCVSS 3.7EG 3.7✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 contain a quadratic CPU exhaustion vulnerability in XMLCorpusView._read_xml_fragment() that rescans accumulated XML fragments on every 1 KiB block read. Attackers can provide malformed XML corpus files to cause …
- CVE-2026-81724MEDIUMCVSS 5.3EG 5.3✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK before 3.10.3 contains an uncontrolled recursion vulnerability in nltk.featstruct.FeatStructReader that allows unauthenticated attackers to cause a denial of service by supplying deeply nested feature-structure input. Attackers can cr…
- CVE-2026-81725LOWCVSS 3.7EG 3.7✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK before 3.10.3 contains a regular expression denial of service vulnerability in Pl196xCorpusReader that allows attackers to cause quadratic CPU consumption by supplying malformed TEI blocks with many unmatched opening tags. Attackers c…
- CVE-2026-81726HIGHCVSS 7.0EG 7.0✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK through 3.10.3 contains a path traversal vulnerability in model-artifact APIs that bypass pathsec enforcement by using raw file operations on caller-controlled paths. Attackers can read or write files outside allowed sandbox roots thr…
- CVE-2026-81727HIGHCVSS 7.1EG 7.1✓ Fixed in 3.10.32026-08-27
vulnerable: 0.8 ... 3.9b1 (68 versions)
NLTK versions before 3.10.3 contain a filesystem containment bypass vulnerability in the Downloader.download and Downloader.incr_download methods that allows attackers to overwrite files outside the install root through pre-existing hardli…
Check whether nltk is used in your infrastructure
EchelonGraph scans your cloud and SBOMs to map every package to your actual deployments. See blast radius for nltk CVEs against the assets you own.
Start Free Scan →