VDB

CVE-2025-71408

CVE-2025-71408 PUBLISHED CVSS 8.5 HIGH

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

Reported by vulncheck · Published July 24, 2026

nltk is fixed in 3.9.3 (PyPI)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
nltkPyPI3.9.3
ntlkntlk3.9.3
nltknltk3.9.3

Risk scores

CVSS 4.0
8.5
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected products

VendorProductVersions
ntlkntlk0
PyPInltk0
ntlkntlk0

Timeline

  • Jul 24, 2026 CVE Published
  • Jul 25, 2026 EPSS Score (16 in total, the first dated here)
  • Jul 25, 2026 Coalition ESS Score
  • Jul 27, 2026 Security Advisory

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2025-71408
vulnetix vdb fixes CVE-2025-71408

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-71408/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›