Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain local write access to shared NLTK data directory
-
DeliveryPlant hardlink in directory pointing to target outside-root file
-
ExploitWait for privileged user or pipeline to invoke NLTK Downloader
-
ExecutionExtraction writes package content through hardlink
-
ImpactTarget file overwritten with attacker-controlled content
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires that the attacker have local write access to the NLTK shared downloader directory (AV:L/PR:L per CVSS 4.0 vector) - this is the critical prerequisite. The downloader directory must be shared or world/group-writable; private per-user NLTK data directories are not exploitable. The attacker must be able to create a hardlink to the intended target file: on Linux systems with fs.protected_hardlinks=1 (default since kernel 3.6), this is limited to files the attacker already owns, significantly narrowing the target set. On older kernels or systems where this protection is disabled, any file on the same filesystem can be hardlinked. Exploitation is triggered passively when any user (or automated process) runs Downloader.download or Downloader.incr_download - no direct attacker-victim interaction is needed after the hardlink is planted. The attack is limited to files on the same filesystem as the NLTK data directory (hardlinks cannot cross filesystem boundaries). Windows behavior with hardlinks differs from POSIX and the exploitability on Windows is not confirmed from available data. |
| Impact | The CVSS 4.0 vector AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N yields a score of 6.9, reflecting local access with low-privilege requirements and high integrity and availability impact on the vulnerable system, but no subsequent-system scope change. The local attack vector (AV:L) and low-privilege requirement (PR:L) meaningfully constrain real-world exposure - single-user workstations, per-user virtual environments, and properly isolated containers carry limited risk. Exposure is elevated in shared computing environments where the NLTK data directory is world- or group-writable, enabling a non-privileged attacker to stage the attack passively. Note that modern Linux kernels with fs.protected_hardlinks=1 (default since kernel 3.6) restrict hardlink creation to files owned by the linking user, which limits the attacker's ability to target files outside their own ownership - this is not explicitly addressed in the available advisory text and defenders should verify the effective hardlink protection policy in their environment. No KEV listing, no EPSS data, and no public exploit code have been identified; real-world exploitation is plausible but not confirmed. |
| Exploit ScenarioDerived | An attacker with a local account on a shared HPC cluster creates a hardlink inside the world-writable NLTK data directory (e.g., ~/shared/nltk_data) pointing to a target file on the same filesystem, such as a cron script or application configuration file owned by a higher-privileged service account. When a legitimate user or automated pipeline subsequently runs NLTK's Downloader to fetch a corpus package, the extraction writes package content through the hardlink, silently overwriting the target file with attacker-controlled data. No public exploit code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 27, 2026
Filesystem containment bypass in NLTK's Downloader component allows local attackers with write access to a shared download directory to overwrite arbitrary files outside the intended install root by planting hardlinks before a download operation. All NLTK versions prior to 3.10.3 are affected via the Downloader.download and Downloader.incr_download methods, which fail to validate link targets during package extraction. No public exploit has been identified at time of analysis; risk is highest in shared multi-user environments such as HPC clusters or build servers where the NLTK data directory is world- or group-writable.
RemediationAI
Upgrade NLTK to version 3.10.3 or later, which resolves the hardlink bypass in the Downloader component per the vendor advisory at https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672 and the VulnCheck advisory at https://www.vulncheck.com/advisories/nltk-before-3.10.3-hardlink-file-overwrite-via-downloader. In pip-managed environments, run 'pip install --upgrade nltk>=3.10.3'. Where immediate upgrade is not feasible, restrict the NLTK downloader directory permissions to the owning user only (chmod 700 on the NLTK data directory, e.g. ~/nltk_data) to prevent untrusted local users from planting hardlinks - note this breaks shared-corpus workflows and requires each user to maintain their own download cache. Running NLTK download operations in isolated containers or under dedicated service accounts with private data directories eliminates the shared-directory attack surface entirely, though it introduces operational overhead. Verifying that fs.protected_hardlinks is enabled (sysctl fs.protected_hardlinks should return 1) provides an additional OS-level mitigation on Linux but should not be treated as a substitute for patching.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NLTK (Natural Language Toolkit) is a widely used Python library for natural language processing, distributed via PyPI and conda. Its Downloader component fetches and extracts corpora and model packages to a local install root. CWE-59 (Improper Link Resolution Before File Access, 'Link Following') is the root cause: the extraction logic resolves filesystem paths without verifying whether directory entries are hardlinks pointing outside the intended tree. On POSIX systems, a hardlink is an additional directory entry referencing an existing inode on the same filesystem - no special privilege is required to create one to a file the creator already owns. The affected CPE is cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:* covering all versions before 3.10.3. When the downloader writes extracted package content to what it believes is a path within the install root, it may actually be writing to an arbitrary file elsewhere on the same filesystem if a hardlink was pre-planted by an attacker.
Know when Nltk gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Local access with write access to shared directory required (AV:L/PR:L); no scope change as impact stays within the filesystem authority of the running user (S:U).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
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 hardlinks. Attackers with write access to a shared downloader directory can create hardlinks pointing to outside-root files that are then overwritten during normal package extraction, mutating files outside the intended install tree.
Blast Radius
ecosystem impact- 6,223 pypi packages depend on nltk (3,096 direct, 3,208 indirect)
Ecosystem-wide dependent count for version 3.10.3.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p
Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic
Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow
StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc
Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to
Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers
Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse
XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s
Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service
Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu
Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated
NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a
EUVD-2026-67077
GHSA-4xw3-jf9x-x7mf
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB