CVE-2026-79674
NLTK 3.10.2 Path Traversal via corpus-reader constructors
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.8
NLTK 3.10.2 Path Traversal via corpus-reader constructors
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
CVE-2026-79674- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-73
- Updated
- 2026-11-02
EUVDEUVD-2026-65524
8.8
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
EUVD-2026-65524- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-3gq4-3j92-5w49
8.8
NLTK: Corpus Reader Sandbox Bypass
Summary
NLTK corpus-reader constructors can still reach outside-root file and database reads before the nltk.pathsec sandbox boundary is enforced.
The PoC shows the safe path blocked by pathsec.open, then LinThesaurusCorpusReader and PanLexLiteCorpusReader succeeding in the same process.
Affected Product
- Product: NLTK
- Asset / component:
nltk.corpus.readerconstructors - Version tested:
3.10.2 - Deployment / package / tag: commit
474af1f5a94b1b8d53fc2b6defec3a2ce7633b74/ PyPInltk - Environment used for verification: Python 3.13.14
Vulnerability Details
- Vulnerability class: path sandbox bypass / external control of file path
- Required privileges: none beyond the ability to supply a corpus root path to a consumer call site
- Entry point:
LinThesaurusCorpusReader(root)andPanLexLiteCorpusReader(root) - Trust boundary crossed: NLTK data-root sandbox enforced by
nltk.pathsec - Root affected functions:
- Measured unsafe effect: outside-root file/database reads still happen with
ENFORCE=True
Root Cause
CorpusReader.__init__() turns a string root into a FileSystemPathPointer without any pathsec validation, and these readers then use builtin open() or sqlite3.connect() directly on derived paths. The constructor path therefore never hits the sandbox guard that pathsec.open() enforces.
if zipfile:
root = ZipFilePathPointer(zipfile, zipentry)
else:
root = FileSystemPathPointer(root)
with open(path) as lin_file:
...
self._c = sqlite3.connect(os.path.join(root, "db.sqlite")).cursor()
Proof of Concept
Save the script as hy01_raw_path_poc.py in the checkout root and run python hy01_raw_path_poc.py.
#!/usr/bin/env python3
"""PoC for HY-01: corpus-reader sandbox bypass.
This script proves three facts:
- pathsec blocks a direct read through the sandboxed file API
- LinThesaurusCorpusReader still reaches builtin open() on an outside path
- PanLexLiteCorpusReader still opens an outside sqlite database and loads data
"""
from __future__ import annotations
import builtins
import pathlib
import sqlite3
import sys
import tempfile
from unittest.mock import patch
try:
import nltk.pathsec as pathsec
from nltk.corpus.reader.lin import LinThesaurusCorpusReader
from nltk.corpus.reader.panlex_lite import PanLexLiteCorpusReader
except ModuleNotFoundError:
here = pathlib.Path(__file__).resolve()
for base in (here.parent, *here.parents):
if (base / "nltk").is_dir() and (base / "setup.py").exists():
sys.path.insert(0, str(base))
break
else:
raise RuntimeError(
"Could not import nltk. Run this script from an NLTK checkout root "
"or from an environment where the current checkout is installed."
)
import nltk.pathsec as pathsec
from nltk.corpus.reader.lin import LinThesaurusCorpusReader
from nltk.corpus.reader.panlex_lite import PanLexLiteCorpusReader
def main() -> int:
pathsec.ENFORCE = True
with patch.object(pathsec, "_get_allowed_roots", lambda: set()):
with patch.object(pathsec.os, "getcwd", lambda: "sandbox-disabled"):
with tempfile.TemporaryDirectory() as tmp:
tmpdir = pathlib.Path(tmp)
outside = tmpdir / "outside"
outside.mkdir()
blocked_file = outside / "blocked.txt"
blocked_file.write_text("blocked", encoding="utf-8")
control_target = str(blocked_file)
…
- Record
GHSA-3gq4-3j92-5w49- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-73
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-rcw8-9qrw-27m2
8.8
Duplicate Advisory: NLTK: Corpus Reader Sandbox Bypass
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-3gq4-3j92-5w49. This link is maintained to preserve external references.
Original Description
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
GHSA-rcw8-9qrw-27m2- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-73
- Updated
- 2026-11-02
NVD
8.8
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
CVE-2026-79674- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-73
- Updated
- 2026-11-02
OSV
8.8
NLTK 3.10.2 Path Traversal via corpus-reader constructors
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
CVE-2026-79674- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-73
- Updated
- 2026-11-02
Show 6 moreShow less
OSVDEBIAN-CVE-2026-79674
8.8
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
DEBIAN-CVE-2026-79674- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVGHSA-3gq4-3j92-5w49
8.8
NLTK: Corpus Reader Sandbox Bypass
Summary
NLTK corpus-reader constructors can still reach outside-root file and database reads before the nltk.pathsec sandbox boundary is enforced.
The PoC shows the safe path blocked by pathsec.open, then LinThesaurusCorpusReader and PanLexLiteCorpusReader succeeding in the same process.
Affected Product
- Product: NLTK
- Asset / component:
nltk.corpus.readerconstructors - Version tested:
3.10.2 - Deployment / package / tag: commit
474af1f5a94b1b8d53fc2b6defec3a2ce7633b74/ PyPInltk - Environment used for verification: Python 3.13.14
Vulnerability Details
- Vulnerability class: path sandbox bypass / external control of file path
- Required privileges: none beyond the ability to supply a corpus root path to a consumer call site
- Entry point:
LinThesaurusCorpusReader(root)andPanLexLiteCorpusReader(root) - Trust boundary crossed: NLTK data-root sandbox enforced by
nltk.pathsec - Root affected functions:
- Measured unsafe effect: outside-root file/database reads still happen with
ENFORCE=True
Root Cause
CorpusReader.__init__() turns a string root into a FileSystemPathPointer without any pathsec validation, and these readers then use builtin open() or sqlite3.connect() directly on derived paths. The constructor path therefore never hits the sandbox guard that pathsec.open() enforces.
if zipfile:
root = ZipFilePathPointer(zipfile, zipentry)
else:
root = FileSystemPathPointer(root)
with open(path) as lin_file:
...
self._c = sqlite3.connect(os.path.join(root, "db.sqlite")).cursor()
Proof of Concept
Save the script as hy01_raw_path_poc.py in the checkout root and run python hy01_raw_path_poc.py.
#!/usr/bin/env python3
"""PoC for HY-01: corpus-reader sandbox bypass.
This script proves three facts:
- pathsec blocks a direct read through the sandboxed file API
- LinThesaurusCorpusReader still reaches builtin open() on an outside path
- PanLexLiteCorpusReader still opens an outside sqlite database and loads data
"""
from __future__ import annotations
import builtins
import pathlib
import sqlite3
import sys
import tempfile
from unittest.mock import patch
try:
import nltk.pathsec as pathsec
from nltk.corpus.reader.lin import LinThesaurusCorpusReader
from nltk.corpus.reader.panlex_lite import PanLexLiteCorpusReader
except ModuleNotFoundError:
here = pathlib.Path(__file__).resolve()
for base in (here.parent, *here.parents):
if (base / "nltk").is_dir() and (base / "setup.py").exists():
sys.path.insert(0, str(base))
break
else:
raise RuntimeError(
"Could not import nltk. Run this script from an NLTK checkout root "
"or from an environment where the current checkout is installed."
)
import nltk.pathsec as pathsec
from nltk.corpus.reader.lin import LinThesaurusCorpusReader
from nltk.corpus.reader.panlex_lite import PanLexLiteCorpusReader
def main() -> int:
pathsec.ENFORCE = True
with patch.object(pathsec, "_get_allowed_roots", lambda: set()):
with patch.object(pathsec.os, "getcwd", lambda: "sandbox-disabled"):
with tempfile.TemporaryDirectory() as tmp:
tmpdir = pathlib.Path(tmp)
outside = tmpdir / "outside"
outside.mkdir()
blocked_file = outside / "blocked.txt"
blocked_file.write_text("blocked", encoding="utf-8")
control_target = str(blocked_file)
…
- Record
GHSA-3gq4-3j92-5w49- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-73
- Updated
- 2026-11-02
OSVGHSA-rcw8-9qrw-27m2
8.8
Duplicate Advisory: NLTK: Corpus Reader Sandbox Bypass
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-3gq4-3j92-5w49. This link is maintained to preserve external references.
Original Description
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
GHSA-rcw8-9qrw-27m2- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-73
- Updated
- 2026-11-02
OSVPYSEC-2026-3736
8.8
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
PYSEC-2026-3736- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-79674
8.8
NLTK versions before 3.10.3 contain a path sandbox bypass vulnerability in corpus-reader constructors that allows attackers to read files outside the intended data root. Attackers can supply arbitrary corpus root paths to LinThesaurusCorpusReader and PanLexLiteCorpusReader constructors to access filesystem content and SQLite databases outside the pathsec sandbox boundary.
- Record
UBUNTU-CVE-2026-79674- CVSS 4.0
- 8.8 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 8.2 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N - Updated
- 2026-11-02
OSVMGASA-2026-0340 No score
Updated python-nltk packages fix security vulnerabilities
Updated packages fix security vulnerabilities. Please see the links.
- Record
MGASA-2026-0340- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
nltkPyPI |
through 3.10.2 | 3.10.3 |
nltkDebian:12 |
All versions, plus listed versions 3.10.0-13.10.1-13.10.3-13.8-13.8.1-1 Show 4 moreShow less3.9.1-13.9.1-23.9.2-13.9.3-1 |
None known |
nltkDebian:13 |
All versions, plus listed versions 3.10.0-13.10.1-13.10.3-13.9.1-23.9.2-13.9.3-1 |
None known |
nltkDebian:14 |
before 3.10.3-1, plus listed versions 3.10.0-13.10.1-13.9.1-23.9.2-13.9.3-1 |
3.10.3-1 |
nltkPyPI |
before 3.10.3, plus listed versions 0.80.90.9.30.9.40.9.5 Show 45 moreShow less0.9.60.9.70.9.80.9.92.0.12.0.1rc12.0.1rc2-git2.0.1rc32.0.1rc42.0.22.0.32.0.42.0.52.0b42.0b52.0b62.0b72.0b82.0b93.0.03.0.0b13.0.0b23.0.13.0.23.0.33.0.43.0.53.13.10.03.10.13.10.23.23.2.13.2.23.2.33.2.43.2.53.33.43.4.13.4.23.4.33.4.43.4.53.5 |
3.10.3 |
python-nltkMageia:10 From an advisory covering 18 CVEs |
before 3.10.3-1.mga10 | 3.10.3-1.mga10 |
python-nltkMageia:9 From an advisory covering 18 CVEs |
before 3.10.3-1.mga9 | 3.10.3-1.mga9 |
nltkUbuntu:Pro:14.04:LTS |
All versions, plus listed versions 2.0~b9-0ubuntu42.0~b9-0ubuntu4.1~esm22.0~b9-0ubuntu4.1~esm42.0~b9-0ubuntu4.1~esm52.0~b9-0ubuntu4.1~esm6 |
None known |
nltkUbuntu:Pro:16.04:LTS |
All versions, plus listed versions 3.0.4-13.0.5-13.1-13.1-1ubuntu0.13.1-1ubuntu0.1+esm13.1-1ubuntu0.1+esm23.1-1ubuntu0.1+esm33.1-1ubuntu0.1+esm4 |
None known |
nltkUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 3.2.4-13.2.5-13.2.5-1ubuntu0.13.2.5-1ubuntu0.1+esm13.2.5-1ubuntu0.1+esm23.2.5-1ubuntu0.1+esm33.2.5-1ubuntu0.1+esm4 |
None known |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
nltkUbuntu:Pro:20.04:LTS |
All versions, plus listed versions 3.4.5-13.4.5-23.4.5-2ubuntu0.1~esm13.4.5-2ubuntu0.1~esm23.4.5-2ubuntu0.1~esm33.4.5-2ubuntu0.1~esm4 |
None known |
nltkUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 3.5-13.6.5-13.6.7-13.7-13.7-1ubuntu0.1~esm13.7-1ubuntu0.1~esm2 |
None known |
nltkUbuntu:Pro:24.04:LTS |
All versions, plus listed versions 3.8.1-13.8.1-1ubuntu0.1~esm13.8.1-1ubuntu0.1~esm2 |
None known |
nltkUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 3.9.1-23.9.1-2build13.9.2-13.9.2-1ubuntu0.1~esm13.9.2-1ubuntu0.1~esm2 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-79674 is a high vulnerability (CVSS 8.8) in Nltk, published August 25, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.39%, the 33rd percentile. Fixed in nltk 3.10.3.
References
github.com/nltk/nltk/security/advisories/GHSA-3gq4-3j92-5w49
vulncheck.com/advisories/nltk-path-traversal-via-corpus-reader-constructors
nvd.nist.gov/vuln/detail/CVE-2026-79674
github.com/nltk/nltk/commit/bc007200d123c1a98d74c2eb230f5e06c53886b8
github.com/nltk/nltk/releases/tag/v3.10.3
github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3736.yaml
Show 10 moreShow less
github.com/advisories/GHSA-3gq4-3j92-5w49
github.com/advisories/GHSA-rcw8-9qrw-27m2
github.com/CVEProject/cvelistV5/tree/main/cves/2026/79xxx/CVE-2026-79674.json
security-tracker.debian.org/tracker/CVE-2026-79674
github.com/nltk/nltk
advisories.mageia.org/MGASA-2026-0340.html
bugs.mageia.org/show_bug.cgi?id=36186
github.com/nltk/nltk/releases
ubuntu.com/security/CVE-2026-79674
cve.org/CVERecord?id=CVE-2026-79674
Left out here: 18 versions and the rest of 2 source descriptions. The JSON record has them.