CVE-2025-71408: nltk Eval Injection
Vulnerability summary
CVE-2025-71408 is a high (CVSS 8.5) Eval Injection vulnerability in nltk. EPSS estimates a 0.27% chance of exploitation in the next 30 days, higher than 17.3% of scored vulnerabilities. 1 public exploit is recorded.
Timeline
- 24-07-2026PublishedVulnerability first disclosed.
- 08-10-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
8 scores · 5 sources · 2 versions- OSV · PypiEcosystem advisory · calculated8.5HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.5HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
- OSV · DebianEcosystem advisory · calculated8.5HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- NVDNIST8.5HighCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- NVDNIST7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.27%
Chance of exploitation in the next 30 days
Percentile
17%
Versus all other CVEs
30-day change
+0.07 pp
From 0.20% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (aydinnyunus.github.io)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Debian1 product
- nltkAll versions (No fix recorded) | < 3.9.3-1
Nltk1 product
- nltk< 3.9.3
Ntlk1 product
- ntlk< 3.9.3
PyPI1 product
- nltk< 3.9.3
Ubuntu1 product
- nltkAll versions (No fix recorded)
5 vendors · 5 products
References
13 links- aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/Technical DescriptionExploitEVIDENCEREPORTPress/Media CoverageThird Party Advisory
- www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-argumentsThird Party AdvisoryWEBFIXREPORTPatch
- github.com/nltk/nltkPACKAGE