CVE-2025-71408
Last modified
CVE-2025-71408 is a high-severity vulnerability rated 8.5/10 on the CVSS scale. 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.. EPSS estimates a 0.16% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
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/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
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Nltk | Nltk | < 3.9.3 |
References
- https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/Exploit, Press/Media Coverage, Third Party Advisory
- https://github.com/nltk/nltk/pull/3465Issue Tracking, Patch
- https://github.com/nltk/nltk/releases/tag/3.9.3Release Notes
- https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-argumentsPatch, Third Party Advisory
Timeline
- Published
- Last Modified
- Status
- Analyzed
Frequently Asked Questions
What is CVE-2025-71408?
How severe is CVE-2025-71408?
How do I fix CVE-2025-71408?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2025
- CVE-2025-7140A vulnerability classified as problematic has been found in …5.4
- CVE-2025-71400better-auth passkey versions before 1.4.0 contain an insecur…7.1
- CVE-2025-71401better-auth (npm) before 1.4.2 allows an external request to…9.3
- CVE-2025-71402better-auth versions greater than 1.3.34 and before 1.4.0 co…2
- CVE-2025-71403better-auth versions before 1.1.20 contain a bypass vulnerab…7.1
- CVE-2025-71404better-auth versions after v0.0.2 and before 1.1.16 contain …5.1
- CVE-2025-71409Lack of authentication for Very High Frequency Data Link mes…7.1
- CVE-2025-7141A vulnerability classified as problematic was found in Sourc…5.4
- CVE-2025-71410Unnumbered Disconnect (U DISC) and malformed Aviation Very H…6
- CVE-2025-71411Broadcast control frames can disconnect multiple aircraft si…6
- CVE-2025-71412Injection of false emergency or status messages over CPDLC m…7.1
- CVE-2025-71413Malformed or out-of-sequence frames at the Aviation Very Hig…6
Are you affected by CVE-2025-71408?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
