---
id: CVE-2026-70626
title: >-
  NLTK versions before 3.9.4 contain a symlink escape vulnerability in
  CorpusReader.open() that allows local attackers to read arbitrary files
  outside the corpus root
summary: >-
  NLTK versions before 3.9.4 contain a symlink escape vulnerability in
  CorpusReader.open() that allows local attackers to read arbitrary files
  outside the corpus root. The vulnerability exists because path validation is
  lexical and does no…
severity: medium
cvss: 6.2
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-59
published: '2026-08-22'
updated: '2026-08-22'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-70626'
references:
  - url: 'https://github.com/nltk/nltk/security/advisories/GHSA-r6gq-whwq-mvg9'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/nltk-before-symlink-escape-via-corpusreader
    label: disclosure@vulncheck.com
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-70626'
  - url: 'https://github.com/nltk/nltk/pull/3522'
  - url: >-
      https://github.com/nltk/nltk/commit/1b0e519e2324bc1a273d56edee63e44d0ad85b48
  - url: 'https://github.com/nltk/nltk/releases/tag/3.9.4'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3732.yaml
  - url: 'https://github.com/advisories/GHSA-r6gq-whwq-mvg9'
  - url: 'https://github.com/nltk/nltk'
tags:
  - nvd
  - ghsa
  - pip
  - osv
ingestedAt: '2026-08-23T04:42:15.619Z'
epss: 0.002
epssPercentile: 0.08734
aliases:
  - GHSA-r6gq-whwq-mvg9
  - PYSEC-2026-3732
ecosystem: pip
vendor: nltk
product: nltk
affected:
  - nltk <= 3.9.3
patched:
  - nltk 3.9.4
---

## Overview

NLTK versions before 3.9.4 contain a symlink escape vulnerability in CorpusReader.open() that allows local attackers to read arbitrary files outside the corpus root. The vulnerability exists because path validation is lexical and does not account for symlink resolution, enabling attackers to place symlinks inside the corpus root to access files outside the intended boundary.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-70626)

Affected packages:

- `nltk <= 3.9.3`

Patched in:

- `nltk 3.9.4`

Source: https://github.com/advisories/GHSA-r6gq-whwq-mvg9
