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: n/a
KEV: No
Impact: n/a
Action: n/a
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).

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 not available, so exploitation likelihood cannot be quantified, but the technical barrier 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 22, 2026 at 15:24 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 22, 2026 at 15:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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-22T14:12:44.983Z

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

Link: CVE-2026-70626

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

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

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

Link: CVE-2026-70626

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T15:30:05Z

Weaknesses
  • CWE-59

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