Vulnerability · Published Jul 24, 2026 · Assigned by VulnCheck

CVE-2025-71408NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments

High 7.8

In plain English

A high-severity security flaw in ntlk from ntlk. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 19% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.8High
Exploit odds (30 days)0.3%top 81.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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 & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12nltkno fix listedDEBIAN-CVE-2025-71408
Debian:13nltkno fix listedDEBIAN-CVE-2025-71408
Debian:14nltk3.9.3-1DEBIAN-CVE-2025-71408
PyPInltk3.9.3GHSA-848c-c2cx-j7qx
PyPInltk3.9.3PYSEC-2026-3657

Affected products (as reported)

VendorProductVersions
ntlk ntlk 0 – before 3.9.3

Weakness: CWE-95 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References