nltk
PyPI65 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 2
- CVE-2019-14751HIGHCVSS 7.5EG 7.5fixed 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.5fixed 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.5fixed 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.5fixed in 3.6.6 or 3.6.5, by version range2021-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.8fixed 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-14009CRITICALCVSS 8.8EG 10.0fixed 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.8fixed 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 8.6fixed 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.6fixed 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.0fixed 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-109956HIGHCVSS 7.0EG 7.0fixed in 3.10.42026-10-13
vulnerable: 0.8 ... 3.9b1 (69 versions)
NLTK before 3.10.4 contains a path traversal vulnerability in WekaClassifier that allows attackers to bypass nltk.pathsec containment by supplying unvalidated model paths. Attackers controlling the model_filename or model argument can make…
- CVE-2026-12061HIGHCVSS 7.5EG 7.5fixed 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.5fixed 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.5fixed 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.6fixed 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.8fixed 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 6.5EG 6.5fixed in 3.9.32026-08-03
vulnerable: 0.8 ... 3.9b1 (65 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-12261MEDIUMCVSS 6.5EG 6.5fixed in 3.10.02026-08-07
vulnerable: 0.8 ... 3.9b1 (65 versions)
A vulnerability in `nltk.downloader` in nltk/nltk versions <= 3.9.4 allows for cross-package resource and model poisoning. The downloader extracts package archives into shared namespaces such as `corpora/` and `taggers/` instead of package…
- CVE-2026-12372LOWCVSS 3.7EG 3.7fixed in 3.10.02026-08-09
vulnerable: 0.8 ... 3.9b1 (65 versions)
A Server-Side Request Forgery (SSRF) vulnerability exists in nltk/nltk versions 3.9.4 and the current develop branch. The `nltk.pathsec.validate_network_url()` function, intended to prevent SSRF by rejecting internal network addresses, fai…
- CVE-2026-126296MEDIUMCVSS 4.8EG 4.8fixed in 3.10.42026-11-13
vulnerable: 0.8 ... 3.9b1 (69 versions)
NLTK before 3.10.4 contains a path traversal vulnerability in save_maxent_params() and load_maxent_params() that bypasses the pathsec filesystem restriction mechanism. Attackers who control the tab_dir argument can read or overwrite model …
- CVE-2026-126297HIGHCVSS 7.5EG 7.5fixed in 3.10.42026-11-13
vulnerable: 0.8 ... 3.9b1 (69 versions)
NLTK before 3.10.4 contains a quadratic-time denial of service vulnerability in ConllCorpusReader._get_srl_instances that allows remote attackers to exhaust CPU through nested span rescans. Attackers can supply a crafted CoNLL SRL corpus w…
- CVE-2026-126300MEDIUMCVSS 5.3EG 5.3fixed in 3.10.42026-11-13
vulnerable: 3.10.0 ... 3.9b1 (31 versions)
NLTK from 3.2.5 before 3.10.4 contains an algorithmic complexity vulnerability in TreebankWordTokenizer.span_tokenize that allows remote attackers to cause quadratic CPU consumption through repeated list.pop(0) calls. Attackers can submit …
- CVE-2026-126301MEDIUMCVSS 5.3EG 5.3fixed in 3.10.42026-11-13
vulnerable: 3.10.0 ... 3.9b1 (21 versions)
NLTK from 3.6 before 3.10.4 contains an algorithmic complexity vulnerability in LegalitySyllableTokenizer.tokenize that allows remote attackers to exhaust CPU by supplying long all-vowel tokens. Attackers can submit a token such as a long …
- CVE-2026-126302MEDIUMCVSS 3.3EG 6.5fixed in 3.10.42026-11-13
vulnerable: 3.10.0, 3.10.1, 3.10.2, 3.10.3, 3.9.4
NLTK from 3.9.4 before 3.10.4 contains a symlink following vulnerability in nltk.sem.chat80.sql_query() that bypasses the pathsec data-root sandbox containment check. Attackers who can write into a trusted NLTK data root can plant a symbol…
- CVE-2026-126304HIGHCVSS 7.5EG 7.5fixed in 3.10.42026-11-13
vulnerable: 3.10.0, 3.10.1, 3.10.2, 3.10.3
NLTK from 3.10.0 before 3.10.4 contains a symlink escape vulnerability in YCOECorpusReader that allows attackers to read files outside the corpus root by planting psd or pos directory symlinks. Attackers controlling a YCOE corpus can make …
- CVE-2026-128134HIGHCVSS 7.8EG 7.8fixed in 3.10.42026-11-13
vulnerable: 0.8 ... 3.9b1 (69 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.4, nltk.parse.dependencygraph.dot2img resolves the Graphvi…
- CVE-2026-128135HIGHCVSS 7.1EG 7.1fixed in 3.10.42026-11-19
vulnerable: 3.10.0, 3.10.1, 3.10.2, 3.10.3, 3.9.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.9.4 to 3.10.3, NLTK ZIP package extraction can write through an e…
- CVE-2026-128139HIGHCVSS 7.5EG 7.5fixed in 3.10.42026-11-19
vulnerable: 3.10.0 ... 3.9b1 (21 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. From 3.6 to 3.10.3, XMLCorpusView._read_xml_fragment accumulates 1 KiB b…
- CVE-2026-12876MEDIUMEG not assessedfixed 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-129223HIGHCVSS 7.5EG 7.5fixed in 3.10.42026-11-19
vulnerable: 0.8 ... 3.9b1 (69 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.4, WordNet Synset.tree and acyclic_tree traverse relation …
- CVE-2026-129229HIGHCVSS 7.5EG 7.5fixed in 3.10.42026-11-19
vulnerable: 3.10.0, 3.10.1, 3.10.2, 3.10.3
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, TokenSearcher.findall and Text.findall accept …
- CVE-2026-129231MEDIUMCVSS 5.3EG 5.3fixed in 3.10.42026-11-19
vulnerable: 0.8 ... 3.9b1 (69 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.4, SeekableUnicodeStreamReader.readline appends each new b…
- CVE-2026-129232MEDIUMCVSS 5.3EG 5.3fixed in 3.10.42026-11-19
vulnerable: 0.8 ... 3.9b1 (69 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.4, XMLCorpusView.read_block rebuilds the full root-to-node…
- CVE-2026-33230MEDIUMCVSS 6.1EG 6.1fixed 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.5fixed 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.1fixed 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.5fixed 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.5fixed 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.5fixed 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.5fixed 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.5fixed 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.3fixed 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.5fixed 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.5fixed 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.5fixed 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.2fixed 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.8fixed 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.3fixed 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.5fixed 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.8fixed 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…
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.
Book a Demo →