A AegiFlow
HIGHCVSS 8.5EPSS 0.2%

CVE-2025-71408

CVE-2025-71408 updated by NVD

Published
2026-07-25
Modified
2026-08-12
EPSS percentile
8%
Sources
github-advisory, nvd

Summary

NLTK (Natural Language Toolkit) before version 3.9.3 contains an eval injection vulnerability in the nltk.collocations module that allows an attacker who controls command-line arguments to execute arbitrary Python code. When collocations.py is invoked directly, the __main__ block passes command-line arguments directly to eval() as suffixes of BigramAssocMeasures without allowlist validation or sanitization, enabling an attacker to supply a Python expression that escapes the intended attribute lookup and executes arbitrary code including OS commands via the os module.

Affected packages

EcosystemPackageAffected versionsFixed versions
PyPInltk3.9.3

Remediation: Upgrade to 3.9.3 or later.

References

Includes data from the GitHub Advisory Database, licensed under CC-BY 4.0.

Includes data from the National Vulnerability Database (NIST). NVD data is in the public domain; this page is not endorsed by NIST.

CVE® is a registered trademark of The MITRE Corporation. CVE content reproduced under the CVE Terms of Use; copyright designation © MITRE.

EPSS scores provided by the FIRST.org Exploit Prediction Scoring System.