Back to CVE records
High 7.8Published Jul 24, 2026

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

Updated under an hour ago ()

Does this affect you?

It affects ntlk and 1 other product. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
7.8 HIGH (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-95
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
VulnCheck
NVD analysis
Analyzed
Record last updated
Oct 8, 2026
First seen by InfoSec Signals
Oct 9, 2026

Affected products

Affected products
ntlk ntlk
ntlk:ntlk (from the name)
before 3.9.3
CNA record
nltk nltk
nltk:nltk
before 3.9.3
NVD

References

  • technical-description, exploit
  • release-notes, patch
  • issue-tracking, patch
  • patch
  • third-party-advisory

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.