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.
CVE-2025-71408
Score 7.8 from GitHub Security Advisory (severity: HIGH) published 2026-07-25. the CNA's CVSS baseline 7.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 7.8
- EG Score
- 7.8(high)
- EG Risk
- 40(Track)EG Risk 40/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity78% × 45%Exploitation0% × 40%Automatability30% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 0%
- EPSS %ILE
- 5%
- KEV
- Not listed
Published
July 24, 2026
Last Modified
July 25, 2026
Advisory Details (4)
Auto-updated Jul 24, 2026NLTK < 3.9.2 Eval Injection via collocations.py Command-Line Arguments | Advisories | VulnCheck
https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-argumentscommit 66f14096d952 (nltk/nltk)
Patch available: nltk/nltk v3.10.0-rc1 (contains commit 66f14096d952)
https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0acreplace eval() with getattr() in collocations CLI
Patch available: nltk/nltk v3.10.0-rc1 (PR #3465 merged 2025-12-03)
https://github.com/nltk/nltk/pull/3465NLTK Command Injection via eval() in collocations.py
https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/Vendor Advisories for CVE-2025-71408(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 14× in last 7d / 14× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-27 15:04 UTCEG score recompute
- 2026-07-27 15:04 UTCGHSA enrichment
- 2026-07-27 14:13 UTCEPSS rescore
- 2026-07-27 02:55 UTCGHSA enrichment
- 2026-07-26 14:55 UTCEG score recompute
- 2026-07-26 14:55 UTCGHSA enrichment
- 2026-07-26 14:54 UTCEPSS rescore
- 2026-07-26 14:54 UTCEPSS rescore
- 2026-07-26 02:55 UTCEG score recompute
- 2026-07-26 02:55 UTCGHSA enrichment
- 2026-07-25 14:17 UTCEPSS rescore
- 2026-07-25 14:17 UTCEPSS rescore
- 2026-07-24 21:37 UTCEG score recompute
- 2026-07-24 21:36 UTCMITRE cvelistV5first tracked
Frequently asked(5)
What is CVE-2025-71408?
When was CVE-2025-71408 disclosed?
Is CVE-2025-71408 actively exploited?
What is the CVSS score of CVE-2025-71408?
How do I remediate CVE-2025-71408?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2025-71408
Is Your Infrastructure Affected by CVE-2025-71408?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.