CVE-2024-39705 ntlk unsafe deserialization vulnerability

Critical 9.8 Published Updated

Remote code execution occurs in NLTK when downloading untrusted pickled data packages, requiring the use of integrated download functionality.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-39705?

CVE-2024-39705 is a critical unsafe deserialization vulnerability in n/a, published on 27 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

NLTK through 3.8.1 allows 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.

Weakness: CWE-502

Which versions are affected by CVE-2024-39705?

3 open source packages ship an affected version, including nltk.

PackageAffectedFixed in
nltk PyPIAll versions3.9
nltk PyPIAll versions3.9
nltk PyPIAll versions3.9
Linux distribution packages (4)
python-nltk SUSE:Package Hub 15 SP5All versions3.7-bp155.3.3.1
python-nltk SUSE:Package Hub 15 SP6All versions3.7-bp156.4.3.1
python-nltk openSUSE:Leap 15.5All versions3.7-bp155.3.3.1
python-nltk openSUSE:Leap 15.6All versions3.7-bp156.4.3.1

How do I fix CVE-2024-39705?

Upgrade nltk to 3.9 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2024-39705 being exploited?

There is no known exploitation of CVE-2024-39705 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2024-39705, GHSA-cgvx-9447-vcch, PYSEC-2024-167, UBUNTU-CVE-2024-39705, openSUSE-SU-2024:0221-1, openSUSE-SU-2024:0222-1.

Is CVE-2024-39705 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free