CVE Vulnerabilities

CVE-2024-39705

Deserialization of Untrusted Data

Published: Jun 27, 2024 | Modified: Jun 17, 2026
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu
MEDIUM

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

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Affected Software

NameVendorStart VersionEnd Version
NltkUbuntuesm-apps-legacy/xenial*
NltkUbuntuesm-apps/bionic*
NltkUbuntuesm-apps/focal*
NltkUbuntuesm-apps/jammy*
NltkUbuntuesm-apps/noble*
NltkUbuntuesm-apps/xenial*
NltkUbuntuesm-infra-legacy/trusty*
NltkUbuntufocal*
NltkUbuntujammy*
NltkUbuntumantic*
NltkUbuntunoble*
NltkUbuntuoracular*
NltkUbuntutrusty/esm*
NltkUbuntuupstream*

Potential Mitigations

  • Make fields transient to protect them from deserialization.
  • An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.

References