---
id: "CVE-2026-126304"
page: "https://infrastack.ai/live/CVE-2026-126304"
kind: "vulnerability"
aliases: ["CVE-2026-126304"]
title: "NLTK: symlinks in YCOE corpus let attackers read files outside corpus"
severity: "high"
cvss: 8.7
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["nltk", "package", "python"]
not_affected_if: ["nltk-3.10.4-or-later", "nltk-below-3.10.0", "trusted-corpus-only"]
published_at: "2026-11-13T10:17:35+00:00"
first_seen_at: "2026-11-13T10:47:15+00:00"
updated_at: "2026-11-13T10:50:27+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126304", "first_seen_at": "2026-11-13T10:47:15+00:00"}]
exploit_sources: []
---

# NLTK: symlinks in YCOE corpus let attackers read files outside corpus

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

NLTK versions from 3.10.0 before 3.10.4 have a symlink escape in the YCOECorpusReader class. An attacker who controls a YCOE corpus can plant psd or pos directory symlinks so that parsed_sents() and tagged_words() return contents of files outside the corpus root.

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

## How to check

- Check the installed NLTK version with `pip show nltk` and see whether it is at least `3.10.4`.
- Look for YCOE corpus data loaded from untrusted sources and check those directories for `psd` or `pos` symlinks.

## Fix

- NLTK: move to `3.10.4` or later.

## Timeline

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

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nltk/nltk/security/advisories/GHSA-qg35-44qx-7vrr
- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/nltk-3.10.0-before-3.10.4-symlink-escape-in-ycoecorpusreader

## From the sources

NLTK from 3.10.0 before 3.10.4 contains a symlink escape vulnerability in YCOECorpusReader that allows attackers to read files outside the corpus root by planting psd or pos directory symlinks. Attackers controlling a YCOE corpus can make parsed_sents() and tagged_words() return file content from other corpora or temporary files within the NLTK data sandbox.

---

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