Vulnerabilities in pkg:pypi/nltk

PACKAGE
Advisory Identifier: GHSA-2jhm-w3mp-jcwr
Advisory Summary

CVE-2026-12372 is a LOW (CVSS 3.7) nltk network url validation permits vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Nltk libraries in the PyPI ecosystem. The issue involves nltk network url validation permits ssrf to rfc 6598 shared-address-space hosts. Remediation is available by upgrading affected packages to version 3.10.0.

79 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/nltk

79 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/nltk. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-2jhm-w3mp-jcwr CVE-2026-12372 LOW NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts
GHSA-ffj6-66c4-86gw CVE-2026-12261 MODERATE NLTK downloader allows cross-package resource and model poisoning
GHSA-9r6g-266r-89x4 CVE-2026-12252 HIGH NLTK Stanford wrapper classes execute untrusted JAR files without verification
GHSA-gf32-cmjh-8m9v CVE-2026-63310 CRITICAL Duplicate Advisory: NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection
GHSA-8mpw-7fpc-4gqj CVE-2026-81725 MODERATE NLTK: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks
GHSA-w3v8-gmh9-3wv7 CVE-2026-80206 HIGH NLTK: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions
GHSA-rrv8-h7p8-rx55 CVE-2026-80205 HIGH NLTK: ReDoS in nltk.text.Text.findall() via unvalidated user-supplied regular expressions
GHSA-2rrw-hpqm-36pv - HIGH Duplicate Advisory: ReDoS in nltk.text.Text.findall() via unvalidated user-supplied regular expressions
GHSA-3gq4-3j92-5w49 CVE-2026-79674 HIGH NLTK: Corpus Reader Sandbox Bypass
GHSA-p4rw-rvv2-7xwr CVE-2026-79676 HIGH NLTK: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement
GHSA-x99w-6fgc-pmfw CVE-2026-79657 CRITICAL NLTK: Allowlisted pickle loaders still permit code execution in current source
GHSA-97qj-x29f-37w7 CVE-2026-78681 HIGH NLTK: Entity-expansion DoS (billion laughs) via remaining raw ElementTree parses
GHSA-6ww7-3frv-cqxh CVE-2026-78682 HIGH NLTK: pathsec SSRF protection can be bypassed when a proxy is configured
GHSA-rhp5-r9x4-f5g2 CVE-2026-78683 CRITICAL NLTK: Unsafe Pickle Deserialization in TransitionParser Allows Remote Code Execution
GHSA-3hhw-38pf-pxj6 CVE-2026-62383 MODERATE NLTK: Symlink-based arbitrary file read in IPIPANCorpusReader, bypasses nltk.pathsec entirely
GHSA-f833-7jw8-xwrv CVE-2026-62384 HIGH NLTK: Symlink-based sandbox bypass in FramenetCorpusReader (bypasses the fix for CVE-2026-54292)
GHSA-568f-pv23-39p4 CVE-2026-62385 HIGH NLTK: Stable FrameNet and NKJP readers parse outside-root XML
GHSA-qp76-pq9f-gr9m - HIGH Duplicate Advisory: Stable FrameNet and NKJP readers parse outside-root XML in 3.9.4
GHSA-5wp5-5229-5g6q CVE-2026-12259 MODERATE NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection
GHSA-x5ph-mj9p-rfr8 CVE-2026-63312 HIGH NLTK: StreamBackedCorpusView Bypasses pathsec.ENFORCE - Arbitrary Local File Read
GHSA-72r2-7mfr-5xr9 CVE-2026-65915 MODERATE NLTK: FileSystemPathPointer.open() sandbox check is dead code — arbitrary file read via file:// protocol
GHSA-r6gq-whwq-mvg9 CVE-2026-70626 HIGH NLTK: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root
GHSA-p3m8-78j2-g5p3 CVE-2026-62388 HIGH NLTK: Default ENFORCE=False Disables All pathsec Security Controls
GHSA-8vh5-mgjj-w6hg - HIGH Duplicate Advisory: [CWE-1188] Default ENFORCE=False Disables All pathsec Security Controls
GHSA-3gqm-fcw5-w839 CVE-2026-63311 MODERATE NLTK: SSRF Fail-Open in validate_network_url() via DNS Resolution Failure
GHSA-qg9p-xrhj-435m - MODERATE Duplicate Advisory: nltk: SSRF Fail-Open in validate_network_url() via DNS Resolution Failure
GHSA-rf74-v2fm-23pw CVE-2026-66393 MODERATE Natural Language Toolkit (NLTK) has unbounded recursion in JSONTaggedDecoder.decode_obj() may cause DoS
GHSA-cv2g-m8rr-888c - HIGH Duplicate Advisory: Natural Language Toolkit (NLTK) has unbounded recursion in JSONTaggedDecoder.decode_obj() may cause DoS
GHSA-cv22-g7mw-8v73 CVE-2026-71514 LOW NLTK CrubadanCorpusReader path traversal allows arbitrary file disclosure
GHSA-5gh2-94qg-qppq CVE-2026-71513 HIGH NLTK AllowlistUnpickler dotted-name validation bypass allows remote code execution
GHSA-qx2g-xrx7-vfh8 CVE-2026-72818 HIGH NLTK TweetTokenizer vulnerable to denial of service through catastrophic regex backtracking
GHSA-3m7f-6hxv-6796 - MODERATE Duplicate Advisory: Pl196xCorpusReader has quadratic ReDoS on malformed TEI blocks
GHSA-vf76-f5cp-9846 - HIGH Duplicate Advisory: ReDoS in nltk.tgrep via unvalidated user-supplied regular expressions
GHSA-w5q8-6jpp-4246 - HIGH Duplicate Advisory: Corpus readers follow symlinks outside trusted roots despite pathsec enforcement
GHSA-rcw8-9qrw-27m2 - HIGH Duplicate Advisory: NLTK: Corpus Reader Sandbox Bypass
GHSA-8w48-h75v-cxpv - HIGH Duplicate Advisory: Security Report: StreamBackedCorpusView Bypasses pathsec.ENFORCE - Arbitrary Local File Read
GHSA-8h9m-22mv-qv5r - HIGH Duplicate Advisory: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root
GHSA-qq3h-cgj8-w3fx - HIGH Duplicate Advisory: Symlink-based sandbox bypass in FramenetCorpusReader (bypasses the fix for CVE-2026-54292)
GHSA-79ph-w9m5-4v5m - HIGH Duplicate Advisory: FileSystemPathPointer.open() sandbox check is dead code — arbitrary file read via file:// protocol
GHSA-343m-9fqq-97c7 - MODERATE Duplicate Advisory: NLTK: Symlink-based arbitrary file read in IPIPANCorpusReader, bypasses nltk.pathsec entirely
GHSA-vp9c-2pjm-8925 - CRITICAL Duplicate Advisory: Allowlisted pickle loaders still permit code execution in current source
GHSA-gx65-c5hj-vpv5 - CRITICAL Duplicate Advisory: [CWE-502] Unsafe Pickle Deserialization in TransitionParser Allows Remote Code Execution
GHSA-crp9-r7rq-c8cg - HIGH Duplicate Advisory: pathsec SSRF protection can be bypassed when a proxy is configured
GHSA-jx89-3qg8-p2mr - HIGH Duplicate Advisory: Entity-expansion DoS (billion laughs) via remaining raw ElementTree parses (CWE-776)
GHSA-ww6m-cw3f-q94g CVE-2026-81722 MODERATE NLTK: Quadratic-time DoS in PorterStemmer via long runs of 'y'
GHSA-8x48-8g7j-rqxp - HIGH Duplicate Advisory: Quadratic-time DoS in PorterStemmer via long runs of 'y'
GHSA-f794-5jv7-7672 CVE-2026-81727 MODERATE NLTK: Downloader.download follows hardlinks and overwrites outside-root files
GHSA-4xw3-jf9x-x7mf - MODERATE Duplicate Advisory: Downloader.download follows hardlinks and overwrites outside-root files
GHSA-8mgp-746c-j5xp CVE-2026-81726 HIGH NLTK: Model-artifact APIs bypass pathsec and touch files outside allowed roots
GHSA-hqj7-phwp-c3fp - HIGH Duplicate Advisory: Model-artifact APIs bypass pathsec and touch files outside allowed roots
GHSA-vp2x-qp44-57v7 CVE-2026-81723 MODERATE NLTK: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()`
GHSA-hqv3-xm29-p9hq - MODERATE Duplicate Advisory: Quadratic CPU Exhaustion in `XMLCorpusView._read_xml_fragment()`
GHSA-ff5c-cp5c-9wjf CVE-2026-12876 MODERATE NLTK: Uncontrolled resource consumption in RecursiveDescentParser via ambiguous or left-recursive grammars
GHSA-cw6x-m8jw-qmrh CVE-2026-81724 MODERATE NLTK: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input
GHSA-pf76-q698-37v8 - MODERATE Duplicate Advisory: Uncontrolled recursion in nltk.featstruct.FeatStructReader causes unhandled RecursionError (DoS) via deeply nested feature-structure input
GHSA-m4rf-3fr8-xwx3 CVE-2026-79675 CRITICAL NLTK: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841)
GHSA-3h2g-j4wp-7qqq - CRITICAL Duplicate Advisory: JVM argument injection bypass via per-call options in the NLTK Stanford wrappers (incomplete fix of CVE-2026-12841)
GHSA-pv39-qrfq-g8gc - MODERATE Duplicate Advisory: NLTK: Missing Post-Download Integrity Verification Allows Malicious Package Injection
GHSA-6hwm-xvph-95vm CVE-2026-78680 HIGH NLTK: Uncontrolled search path when invoking the Graphviz 'dot' binary
GHSA-54xp-3ww7-6wjg - HIGH Duplicate Advisory: Uncontrolled search path when invoking the Graphviz 'dot' binary (CWE-426/CWE-427)
GHSA-m42h-3232-vpv3 CVE-2026-12243 HIGH nltk: Arbitrary File Read via Path Traversal in nltk.data.load() through Percent-Encoded Sequences
GHSA-q5h6-fcf5-49g9 - HIGH Duplicate Advisory: Arbitrary File Read via Path Traversal in nltk.data.load() through Percent-Encoded Sequences
GHSA-848c-c2cx-j7qx CVE-2025-71408 HIGH NLTK vulnerable to Eval Injection via collocations CLI arguments
GHSA-qvv7-cg9c-w4x3 CVE-2026-12075 HIGH Natural Language Toolkit (NLTK): DNS-rebinding SSRF filter bypass in nltk.pathsec.urlopen (nltk.download / nltk.data.load) defeats ENFORCE mode
GHSA-fg7f-2386-8897 CVE-2026-12061 HIGH Natural Language Toolkit (NLTK): ReDoS in NLTK ReviewsCorpusReader FEATURES regex
GHSA-6hm5-jgcp-p838 CVE-2026-12072 HIGH Natural Language Toolkit (NLTK): Path Traversal in NKJPCorpusReader leads to Arbitrary File Read and bypasses the nltk.pathsec sandbox (ENFORCE=True)
GHSA-xh95-f55m-82fw CVE-2026-12074 HIGH Natural Language Toolkit (NLTK) has path traversal in FramenetCorpusReader.frame() that allows arbitrary XML file read, bypassing the nltk.pathsec sandbox (ENFORCE=True)
GHSA-p4gq-832x-fm9v CVE-2026-54293 HIGH Natural Language Toolkit (NLTK): URL-Encoded Path Traversal in nltk.data.load() Allows Arbitrary Local File Read
GHSA-h8wq-7xc4-p3qx CVE-2026-0846 HIGH NLTK has Arbitrary File Read via Absolute Path Input in nltk.util.filestring()
GHSA-68j8-pq59-fqgm CVE-2026-0847 HIGH NLTK has a Path Traversal issue
GHSA-7p94-766c-hgjp CVE-2025-14009 CRITICAL NLTK has a Zip Slip Vulnerability
GHSA-jm6w-m3j8-898g CVE-2026-33231 HIGH Unauthenticated remote shutdown in nltk.app.wordnet_app
GHSA-469j-vmhf-r6v7 CVE-2026-33236 HIGH NLTK has a Downloader Path Traversal Vulnerability (AFO) - Arbitrary File Overwrite
GHSA-gfwx-w7gr-fvh7 CVE-2026-33230 MODERATE Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in nltk
GHSA-cgvx-9447-vcch CVE-2024-39705 HIGH ntlk unsafe deserialization vulnerability
GHSA-2ww3-fxvq-293j CVE-2021-3828 HIGH NLTK Vulnerable to REDoS
GHSA-mr7p-25v2-35wr CVE-2019-14751 HIGH NLTK Vulnerable To Path Traversal
GHSA-f8m6-h2c7-8h9x CVE-2021-43854 HIGH Inefficient Regular Expression Complexity in nltk (word_tokenize, sent_tokenize)
GHSA-rqjh-jp2r-59cj CVE-2021-3842 HIGH NLTK Vulnerable to REDoS

CVE-2026-12372 at a Glance

CVE Identifier CVE-2026-12372
GHSA Identifier GHSA-2jhm-w3mp-jcwr
Severity LOW
CVSS v3.1 Base Score 3.7
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Nltk
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 3.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-12372

To remediate this vulnerability, upgrade all affected Nltk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nltk fixed: 3.10.0
pip install nltk>=3.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show nltk

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-12372, inspect your installed packages using pip:

pip show nltk

Analyze the terminal output to locate any version of Nltk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.10.0), your application is affected.

Note: The pip show nltk command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Nltk, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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, fails to reject IPs in the RFC 6598 shared address space (`100.64.0.0/10`). This occurs because Python's `ipaddress` module does not classify such addresses as `is_private` or `is_global`, and the current guard only checks `is_private` and a few explicit categories. An attacker who can influence a URL passed to NLTK's network-loading helpers can exploit this vulnerability to make a strict-mode application send requests to shared-address-space hosts, potentially exposing non-public infrastructure reachable from the application host. The impact is limited to SSRF-style confidentiality exposure, with no code execution claimed.

CVE-2026-12372 Affected Nltk Versions

1 component(s)
Fixed Versions:
3.10.0
Product / Package Ecosystem Affected Versions Fixed Version
nltk
PyPI
< 3.10.0
3.10.0

References

Frequently Asked Questions

What is CVE-2026-12372?
CVE-2026-12372 is a security vulnerability in Nltk involving NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts under CWE-918: Server-Side Request Forgery (SSRF).
Which Nltk versions are affected?
Affected versions include releases prior to 3.10.0 across affected packages: nltk.
What version fixes CVE-2026-12372?
Upgrading to 3.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nltk affected?
Yes, nltk is affected in releases prior to 3.10.0. Upgrade your dependency to 3.10.0 or later.
What is the CVSS score of CVE-2026-12372?
CVE-2026-12372 has a CVSS v3.1 base score of 3.7 (LOW) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2026-12372?
CVE-2026-12372 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for CVE-2026-12372?
Run the dependency tree command: 'pip show nltk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2jhm-w3mp-jcwr",
  "modified" : "2026-10-02T23:11:23Z",
  "published" : "2026-08-10T00:31:42Z",
  "aliases" : [ "CVE-2026-12372" ],
  "summary" : "NLTK network URL validation permits SSRF to RFC 6598 shared-address-space hosts",
  "details" : "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, fails to reject IPs in the RFC 6598 shared address space (`100.64.0.0/10`). This occurs because Python's `ipaddress` module does not classify such addresses as `is_private` or `is_global`, and the current guard only checks `is_private` and a few explicit categories. An attacker who can influence a URL passed to NLTK's network-loading helpers can exploit this vulnerability to make a strict-mode application send requests to shared-address-space hosts, potentially exposing non-public infrastructure reachable from the application host. The impact is limited to SSRF-style confidentiality exposure, with no code execution claimed.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nltk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-12372"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nltk/nltk/commit/4a820afa58810cd05049b6c6eae306694d6cfe65"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nltk/nltk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nltk/nltk/releases/tag/v3.10.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3955.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/2911b643-571c-42e4-b0c2-9a1fa6f491db"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-02T23:11:23Z",
    "nvd_published_at" : "2026-08-09T23:16:35Z"
  }
}