CVE-2025-14009

NameCVE-2025-14009
DescriptionA critical vulnerability exists in the NLTK downloader component of nltk/nltk, affecting all versions. The _unzip_iter function in nltk/downloader.py uses zipfile.extractall() without performing path validation or security checks. This allows attackers to craft malicious zip packages that, when downloaded and extracted by NLTK, can execute arbitrary code. The vulnerability arises because NLTK assumes all downloaded packages are trusted and extracts them without validation. If a malicious package contains Python files, such as __init__.py, these files are executed automatically upon import, leading to remote code execution. This issue can result in full system compromise, including file system access, network access, and potential persistence mechanisms.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
nltk (PTS)bullseye3.5-1vulnerable
bookworm3.8-1vulnerable
forky, trixie3.9.1-2vulnerable
sid3.9.2-1vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
nltksource(unstable)(unfixed)

Notes

https://huntr.com/bounties/49ecbc02-054e-4470-b2e0-b267936cc4e4
https://github.com/nltk/nltk/issues/3489
https://github.com/nltk/nltk/pull/3468

Search for package or bug name: Reporting problems