CVE-2026-81727 — Vulnerability in nltk — CVE Details
NLTK: Downloader.download follows hardlinks and overwrites outside-root files
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.19%). Schedule for your next planned update.
Does your project use an affected nltk version?
Paste your requirements.txt to check it for CVE-2026-81727 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
NLTK's downloader now blocks symlink escapes during ZIP extraction, but it still treats pre-existing hardlinks inside the install tree as ordinary in-root files. A normal package install can therefore overwrite an outside-root inode through that hardlink.
Details
- Vulnerability type: Filesystem containment bypass
- Affected component:
nltk.downloader.Downloader.download,nltk.downloader.Downloader.incr_download - Affected versions: Published
3.9.4and current sourcev3.10.0-rc2both reproduced for the extraction-stage overwrite. - Patched versions: 3.10.3
- Root cause: The downloader validates traversal and symlink conditions but does not reject pre-existing hardlink aliases inside the install tree.
The install flow correctly rejects a pre-existing symlink at an extraction target, yet it accepts a pre-existing hardlink at the same path. When the package is installed, extracted member data is written through the hardlink and mutates the outside inode.
PoC
Preconditions
- The attacker can plant files inside a writable shared downloader root on the same filesystem as the target file.
Steps
- Prepare a downloader root and create a hardlink inside it that points to an outside target file.
- Confirm a symlink at the same path is rejected as a negative control.
- Run a normal
Downloader.download()package install whose extracted member lands on the hardlink path. - Observe the outside target file is overwritten while the downloader still reports the package as installed.
Minimal reproducible excerpt
extract_hardlink_before ORIGINAL
extract_hardlink_after PWNED
extract_hardlink_status installed
Impact
A shared or attacker-influenced downloader directory can be turned into an overwrite primitive against same-filesystem files outside the intended install root.
Remediation
Treat pre-existing hardlinks as unsafe in extraction targets, verify that each write path stays within the intended install tree at the inode level, and add regression tests that pair hardlinks with existing symlink controls.
Advisory Timeline
- First published September 2, 2026 (85 days ago).
- Last revised September 10, 2026 — 8 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "nltk>=3.10.3"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: PyPI (1).
| Package | Fixed In |
|---|---|
| nltk PyPI · Affected: 0.8, 0.9, 0.9.3, 0.9.4 (+64 more) | 3.10.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-59
- CWE-61
- CWE-73
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.1 score means for each attack dimension.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
References
- https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-81727ADVISORY
- https://github.com/nltk/nltk/pull/3797WEB
- https://github.com/nltk/nltk/commit/9e6d5f05902b9aaa1221a0a565448d17a9c9b3e8WEB
- https://github.com/nltk/nltkPACKAGE
- https://github.com/nltk/nltk/releases/tag/v3.10.3WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3741.yamlWEB
- https://www.vulncheck.com/advisories/nltk-before-3.10.3-hardlink-file-overwrite-via-downloaderWEB
Frequently Asked Questions
- What is CVE-2026-81727?
- NLTK: Downloader.download follows hardlinks and overwrites outside-root files. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 7.1/10).
- How do I check if my project is affected by CVE-2026-81727?
- CVE-2026-81727 affects nltk. It has a 0.2% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-81727 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 4.8% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2025-14009CRITICAL
NLTK has a Zip Slip Vulnerability
- CVE-2026-66393HIGH
- CVE-2026-62385HIGH
- CVE-2026-128134HIGH
NLTK dot2img runs Graphviz 'dot' without the trusted-exec chokepoint, enabling local code execution via a writable PATH element
- CVE-2025-71408HIGH
NLTK vulnerable to Eval Injection via collocations CLI arguments
- CVE-2026-12075HIGH
Natural Language Toolkit (NLTK): DNS-rebinding SSRF filter bypass in nltk.pathsec.urlopen (nltk.download / nltk.data.load) defeats ENFORCE mode
- CVE-2026-12259MEDIUM
- CVE-2026-129231MEDIUM
NLTK: Quadratic-time DoS in SeekableUnicodeStreamReader.readline on an unterminated corpus line via per-iteration full-buffer rescan