External Control of File Name or Path Affecting nltk package, versions [,3.10.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.23% (14th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-NLTK-19276670
  • published27 Aug 2026
  • disclosed25 Aug 2026
  • creditnguyencanhthuong

Introduced: 25 Aug 2026

NewCVE-2026-79674  (opens in a new tab)
CWE-73  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.10.3 or higher.

Overview

nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

Affected versions of this package are vulnerable to External Control of File Name or Path through the CorpusReader.__init__ constructor and the LinThesaurusCorpusReader and PanLexLiteCorpusReader implementations in nltk/corpus/reader/api.py, nltk/corpus/reader/lin.py, and nltk/corpus/reader/panlex_lite.py. An attacker can make NLTK read files or open an SQLite database outside the intended nltk.pathsec sandbox by supplying a corpus root path to a reader constructor. The vulnerable constructors turn caller-supplied roots into paths and then reach raw open() or sqlite3.connect() on derived locations without sandbox validation, so a process using these readers can expose out-of-root corpus data. In the affected deployments, this lets untrusted corpus-root input bypass the data-root boundary and load local file contents from outside the intended corpus tree.

CVSS Base Scores

version 4.0
version 3.1