Description
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 account for symlink resolution, enabling attackers to place symlinks inside the corpus root to access files outside the intended boundary.
Published: 2026-08-22
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary local file read via symlink traversal
Action: Upgrade
AI Analysis

Impact

The vulnerability exists in NLTK versions before 3.9.4 when the CorpusReader opens files. Path validation is performed only lexically and does not resolve symbolic links, so an attacker who can place a symlink within a corpus directory can point that link to a file outside the intended root. This flaw allows a local attacker to read any file that the process can access, compromising confidentiality. The weakness is a path traversal flaw (CWE‑59, CWE‑22).

Affected Systems

All installations of the NLTK library that use CorpusReader and are running a version older than 3.9.4 are affected. Any environment where an attacker can write into the corpus root—regardless of operating system or corpus content—provides a vector for exploitation.

Risk and Exploitability

The base CVSS score of 8.6 indicates high severity. The EPSS score is reported as < 1%, indicating a low exploitation probability. The technical barrier to exploitation is low once the attacker can create a symlink in the corpus directory. The flaw is not listed in the CISA KEV catalog. A local privileged attacker could read critical configuration files or secrets if the corpus root is writable, and automated tools that load corpora could be used to harvest data. Immediate patching is recommended to avoid this confidentiality breach.

Generated by OpenCVE AI on August 31, 2026 at 13:56 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NLTK to version 3.9.4 or later
  • Restrict write access to any directories used as corpus roots so that untrusted users cannot create symlinks
  • If upgrading is not immediately possible, replace the default CorpusReader with a custom implementation that resolves paths before opening files

Generated by OpenCVE AI on August 31, 2026 at 13:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r6gq-whwq-mvg9 NLTK: Symlink escape in CorpusReader allows arbitrary local file read outside the corpus root
History

Mon, 31 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-22
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 24 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 22 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Description 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 account for symlink resolution, enabling attackers to place symlinks inside the corpus root to access files outside the intended boundary.
Title NLTK before 3.9.4 Symlink Escape via CorpusReader
First Time appeared Nltk
Nltk nltk
Weaknesses CWE-59
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk
Nltk nltk
References
Metrics cvssV3_1

{'score': 6.2, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-24T19:49:30.565Z

Reserved: 2026-08-04T20:17:18.297Z

Link: CVE-2026-70626

cve-icon Vulnrichment

Updated: 2026-08-24T19:49:06.387Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-22T15:16:21.100

Modified: 2026-08-31T19:09:01.757

Link: CVE-2026-70626

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-22T14:12:44Z

Links: CVE-2026-70626 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-31T14:00:19Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')