PyPI: nltk

CVE-2024-39705

Safety vulnerability ID: SFTY-20240627-13723

Safety legacy ID: pyup.io-72089

Affected versions of NLTK are vulnerable to Remote Code Execution if untrusted packages have pickled Python code, and the integrated data package download functionality is used. This affects, for example, averaged_perceptron_tagger and punkt.

Created at: Apr 22, 2026Updated at: Apr 22, 2026

Overview

ntlk unsafe deserialization vulnerability

Advisory

Affected versions of NLTK are vulnerable to Remote Code Execution if untrusted packages have pickled Python code, and the integrated data package download functionality is used. This affects, for example, averaged_perceptron_tagger and punkt.

Affected Package

Affecting nltk package, versions
>=0.9,<3.9

Also affects

---

How to Fix

Upgrade
nltk
to
3.9
or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more