{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/vendors/nltk/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[{"cvss":7.8,"id":"CVE-2025-71408"}],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["NLTK (Natural Language Toolkit) \u003c 3.9.3"],"_cs_severities":["high"],"_cs_tags":["eval-injection","remote-code-execution","python"],"_cs_type":"advisory","_cs_vendors":["NLTK"],"content_html":"\u003cp\u003eA critical eval injection vulnerability, identified as CVE-2025-71408, has been discovered in the Natural Language Toolkit (NLTK) Python library, affecting all versions prior to 3.9.3. This flaw resides within the \u003ccode\u003enltk.collocations\u003c/code\u003e module, specifically when the \u003ccode\u003ecollocations.py\u003c/code\u003e script is directly invoked via the command line. The vulnerability arises because the script's \u003ccode\u003e__main__\u003c/code\u003e block passes user-supplied command-line arguments directly to Python's \u003ccode\u003eeval()\u003c/code\u003e function without adequate sanitization or allowlist validation. An attacker who can control these command-line arguments can inject arbitrary Python expressions, bypassing the intended attribute lookup mechanism. This allows for the execution of arbitrary Python code, including operating system commands through Python's \u003ccode\u003eos\u003c/code\u003e module, leading to remote code execution (RCE) on the compromised system. The vulnerability presents a significant risk to applications and environments utilizing affected NLTK versions, especially those that process untrusted input via \u003ccode\u003ecollocations.py\u003c/code\u003e.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn attacker crafts a malicious Python expression designed to execute arbitrary code or OS commands.\u003c/li\u003e\n\u003cli\u003eThe attacker delivers or injects this malicious expression into the command-line arguments intended for the \u003ccode\u003ecollocations.py\u003c/code\u003e script.\u003c/li\u003e\n\u003cli\u003eA vulnerable system or application executes \u003ccode\u003ecollocations.py\u003c/code\u003e, passing the attacker-controlled command-line arguments.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003e__main__\u003c/code\u003e block within \u003ccode\u003ecollocations.py\u003c/code\u003e directly processes these arguments and feeds them into the \u003ccode\u003eeval()\u003c/code\u003e function.\u003c/li\u003e\n\u003cli\u003eDue to the \u003ccode\u003eeval injection\u003c/code\u003e vulnerability, the malicious Python expression is evaluated instead of benign data.\u003c/li\u003e\n\u003cli\u003eArbitrary Python code, including system-level commands leveraging the \u003ccode\u003eos\u003c/code\u003e module (e.g., \u003ccode\u003eos.system(\u0026quot;malicious_command\u0026quot;)\u003c/code\u003e), is executed on the host.\u003c/li\u003e\n\u003cli\u003eThe attacker achieves remote code execution on the system, potentially leading to full system compromise, data exfiltration, or further lateral movement.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful exploitation of CVE-2025-71408 grants attackers arbitrary code execution capabilities on the host system where vulnerable NLTK versions are deployed. This can lead to complete system compromise, allowing attackers to install malware, establish persistence, exfiltrate sensitive data, or disrupt operations. The broad use of NLTK in data science, academic research, and various applications suggests a wide potential impact across multiple sectors if not patched. The CVSS v3.1 Base Score of 7.8 indicates a high severity risk.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003ePrioritize patching all instances of NLTK (Natural Language Toolkit) to version 3.9.3 or later to remediate CVE-2025-71408 immediately.\u003c/li\u003e\n\u003cli\u003eImplement robust input validation and sanitization for any application that passes untrusted user input to command-line arguments, especially when those arguments are processed by Python scripts that may use functions like \u003ccode\u003eeval()\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eMonitor process creation logs for unusual child processes spawned by Python interpreters, particularly if \u003ccode\u003ecollocations.py\u003c/code\u003e is known to run on your systems.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-24T22:18:25Z","date_published":"2026-07-24T22:18:25Z","id":"https://feed.craftedsignal.io/briefs/2026-07-nltk-eval-injection/","summary":"An eval injection vulnerability exists in the nltk.collocations module of NLTK (Natural Language Toolkit) versions prior to 3.9.3, allowing an attacker to exploit this by controlling command-line arguments passed to collocations.py, which are then unsafely passed to eval() enabling remote code execution on the affected system.","title":"CVE-2025-71408 NLTK Eval Injection Vulnerability","url":"https://feed.craftedsignal.io/briefs/2026-07-nltk-eval-injection/"}],"language":"en","title":"CraftedSignal Threat Feed - NLTK","version":"https://jsonfeed.org/version/1.1"}