All vulnerabilities

PyPI

CVE-2026-128135

NLTK: ZIP package extraction follows in-root hardlinks and overwrites files outside the NLTK data root

Severity
High 7.1
Published
19 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.2% in the next 30 daysHigher than 13% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Link following (CWE-59)CWE-73
Attack
Needs local access · Needs a user account · No user action needed
Attacker can
Change data · Take it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
Also known as
GHSA-wr3g-j6qj-xpgh
Sources
OSV.dev and GitHub

Description

NLTK ships a security wrapper, nltk.pathsec.ZipFile, that is meant to confine archive extraction to trusted data roots and to block link-based escapes. When nltk.download() installs a package, the extraction write opens each member's target path without checking whether that path is a hardlink to a file located outside the data root. A local actor who can write inside a shared or predictable NLTK data root (for example ~/nltk_data, a group-writable /usr/share/nltk_data, or a shared container volume) can pre-plant an in-root hardlink at a member path that a soon-to-be-installed package will write. When the victim later runs the download, extraction truncates and overwrites the outside-root target through that hardlink. This is the same weakness class as the previously fixed downloader hardlink issue, but the fix did not reach the package-extraction write sink, so the latest published release remains exploitable through this path.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • From 3.9.4 before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References