PyPI
CVE-2026-126302
NLTK: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases
- Severity
- Medium 4.8
- Published
- 13 Nov 2026
- Last changed
- 16 Nov 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 3.10.4
- Exploit chance
- 0.2% in the next 30 daysHigher than 9% of CVEs. EPSS by FIRST, 24 Nov 2026
- Attack
- Needs local access · Needs a user account · No user action needed
- Attacker can
- Read some data
- CVSS vector
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N- Also known as
- GHSA-xmfg-f9cm-w86q
- Sources
- CVE Program, OSV.dev and GitHub
Description
nltk.sem.chat80.sql_query() opens a SQLite database by handing the result of nltk.data.find(dbname) straight to sqlite3.connect() without the path-containment check that the NLTK data sandbox (nltk.pathsec) is meant to enforce. nltk.data.find() applies only lexical checks to the resource name and returns a FileSystemPathPointer whose path is normalized with os.path.abspath but never resolved for symlinks. As a result, an in-root symbolic link that points at a SQLite file outside every registered NLTK data root is followed by SQLite, and the caller receives query results from the out-of-sandbox database. An attacker who can place a file inside a directory the application trusts as an NLTK data root can read SQLite databases that the pathsec sandbox is supposed to keep out of reach.
The security invariant is that file access performed through NLTK data resolution must stay within the configured data roots; the sandbox enforces this in nltk.pathsec via validate_path and pathsec.open,…
Affected software
| Software | Affected versions |
|---|---|
nltkPyPI · osv:PyPI:nltk |
|
About nltk
- Weekly downloads (PyPI)
- 11,948,568PyPI Stats, 23 Nov 2026
Vulnerabilities in nltk
- In our list
- 32
- Published in the last 12 months
- 32
- Critical, last 12 months
- 1
- High, last 12 months
- 14
- Known exploited
- 0
- CVE-2026-128135NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data rootHigh 7.1 19 Nov 2026
- CVE-2026-128136NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinksMedium 6.1 19 Nov 2026
- CVE-2026-128137NLTK corpus-reader view methods bypass the scoped root sandbox via intermediate-directory symlinksMedium 5.5 19 Nov 2026
- CVE-2026-128138NLTK incomplete fix: additional JVM/JAR sandbox bypass through unvalidated launcher tokens in java() command argumentsCritical 9.8 19 Nov 2026
- CVE-2026-128139NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of serviceHigh 7.5 19 Nov 2026
- CVE-2026-128140NLTK: Downloader cyclic collection indices cause an infinite closure walkMedium 6.5 19 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-126302
- GitHub Advisory Database https://github.com/advisories/GHSA-xmfg-f9cm-w86q