---
id: "GHSA-w2j9-qh3j-4h63"
page: "https://infrastack.ai/live/GHSA-w2j9-qh3j-4h63"
kind: "vulnerability"
aliases: ["GHSA-w2j9-qh3j-4h63"]
title: "Duplicate Advisory: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases"
severity: "medium"
cvss: 3.3
epss: null
exploited: false
status: "withdrawn"
category: "package"
products: [{"name": "nltk", "fixed": [], "affected": ">= 3.9.4, <= 3.10.3", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-59", "nltk", "package", "python"]
not_affected_if: ["default-config", "no-chat80-use"]
published_at: "2026-11-13T12:31:17+00:00"
first_seen_at: "2026-11-16T14:51:33+00:00"
updated_at: "2026-11-16T14:51:49+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-w2j9-qh3j-4h63", "first_seen_at": "2026-11-16T14:51:33+00:00"}]
exploit_sources: []
---

# Duplicate Advisory: Symlink escape in chat80.sql_query bypasses the pathsec data-root sandbox to read out-of-root SQLite databases

Link for people: https://infrastack.ai/live/GHSA-w2j9-qh3j-4h63 (this .md is for agents)

NLTK's chat80 sql_query function follows symbolic links, so a symlink planted in a trusted NLTK data directory can point it at SQLite databases outside the sandbox. An attacker who can write into that data root can read those database files.

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

## Affected

- pypi:nltk affected >= 3.9.4, <= 3.10.3 fixed no fixed version listed

## How to check

- Check the installed version with `pip show nltk`; affected range is `3.9.4` up to but not including `3.10.4`.
- Search your code for calls to `nltk.sem.chat80.sql_query` that run on paths you do not fully control.

## Fix

- `nltk` `3.10.4` (the advisory's stated range ends before `3.10.4`; the duplicate advisory GHSA-xmfg-f9cm-w86q is the live record).

## Timeline

- 2026-11-16T14:51:33+00:00 ghsa https://github.com/advisories/GHSA-w2j9-qh3j-4h63

## From the sources

## Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-xmfg-f9cm-w86q. This link is maintained to preserve external references.

## Original Description
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_
