---
id: "CVE-2026-126302"
page: "https://infrastack.ai/live/CVE-2026-126302"
kind: "vulnerability"
aliases: ["CVE-2026-126302"]
title: "NLTK: symlink following lets attackers read SQLite files outside sandbox"
severity: "medium"
cvss: 4.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["nltk", "package", "python"]
not_affected_if: ["chat80-unused", "read-only-data-root"]
published_at: "2026-11-13T10:17:35+00:00"
first_seen_at: "2026-11-13T10:47:15+00:00"
updated_at: "2026-11-13T10:58:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126302", "first_seen_at": "2026-11-13T10:47:15+00:00"}]
exploit_sources: []
---

# NLTK: symlink following lets attackers read SQLite files outside sandbox

Link for people: https://infrastack.ai/live/CVE-2026-126302 (this .md is for agents)

NLTK versions from 3.9.4 before 3.10.4 have a flaw in the chat80 sql_query() function that follows symbolic links and bypasses the data-root sandbox check. An attacker who can write into a trusted NLTK data directory can plant a symlink and read SQLite databases located outside that sandbox.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `pip show nltk` and check whether the version is at least `3.10.4`.
- Check whether your application calls `nltk.sem.chat80.sql_query()` with data paths that other users or processes can write to.

## Fix

- NLTK: move to `3.10.4` or later (from the NVD range 3.9.4 before 3.10.4).

## Timeline

- 2026-11-13T10:47:15+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126302

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nltk/nltk/security/advisories/GHSA-xmfg-f9cm-w86q
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/nltk-3.9.4-before-3.10.4-symlink-sandbox-escape-via-chat80-sql-query

## From the sources

NLTK from 3.9.4 before 3.10.4 contains a symlink following vulnerability in nltk.sem.chat80.sql_query() that bypasses the pathsec data-root sandbox containment check. Attackers who can write into a trusted NLTK data root can plant a symbolic link to read SQLite databases outside the sandbox.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
