CVE-2025-71408
published high CVSS 4.0 · 8.5NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| ntlk | — | ntlk0 to < 3.9.3 · Other versions: affected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.5 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.8 | high | VulnCheck · cna | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| ntlk | ntlk | 0 to < 3.9.3 (affected · semver)Default: affected | VulnCheck · cna |
Weaknesses
1- CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
References
5- Researcher Disclosure https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/
- Patch Commit https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac
- Pull Request https://github.com/nltk/nltk/pull/3465
- NLTK 3.9.3 Release Notes https://github.com/nltk/nltk/releases/tag/3.9.3
- https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments
Provider assertions
2VulnCheck · cna
NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- cb0a7043252250e04fc7629128e3b8d5b9da0dc0da1c26ce5b01917e1147b0cf
- Ingested
- 09 Oct 2026, 16:22:05 UTC
- Source record
- Official CVE record