{"id":"CVE-2025-71408","state":"PUBLISHED","title":"NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments","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.","publishedAt":"2026-07-24T21:07:49.610Z","updatedAt":"2026-10-08T15:21:35.203Z","severity":{"score":8.5,"label":"High","version":"4.0","vector":"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","source":"VulnCheck"},"assigner":"VulnCheck","products":["ntlk ntlk"],"affected":[{"vendor":"ntlk","product":"ntlk","packageURL":"pkg:pypi/nltk","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"3.9.3","versionType":"semver"}],"repo":"https://github.com/nltk/nltk"}],"references":["https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","https://github.com/nltk/nltk/releases/tag/3.9.3","https://github.com/nltk/nltk/pull/3465","https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments"],"weaknesses":["CWE-95"],"ingestedAt":"2026-10-29T20:10:04.440Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/71xxx/CVE-2025-71408.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-71408","state":"PUBLISHED","datePublished":"2026-07-24T21:07:49.610Z","dateUpdated":"2026-10-08T15:21:35.203Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-07-24T20:57:08.784Z"},"containers":{"cna":{"title":"NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"ntlk","product":"ntlk","packageURL":"pkg:pypi/nltk","defaultStatus":"affected","versions":[{"version":"0","status":"affected","lessThan":"3.9.3","versionType":"semver"}],"repo":"https://github.com/nltk/nltk"}],"references":[{"url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","name":"Researcher Disclosure","tags":["technical-description","exploit"]},{"url":"https://github.com/nltk/nltk/releases/tag/3.9.3","name":"NLTK 3.9.3 Release Notes","tags":["release-notes","patch"]},{"url":"https://github.com/nltk/nltk/pull/3465","name":"Pull Request","tags":["issue-tracking","patch"]},{"url":"https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","tags":["patch"],"name":"Patch Commit"},{"url":"https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"LOW","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.5,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","version":"3.1","baseSeverity":"HIGH","baseScore":7.8,"vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-95","lang":"en","description":"Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-10-08T15:21:35.203Z"},"tags":["x_open-source"],"datePublic":"2025-11-17T00:00:00.000Z","credits":[{"lang":"en","value":"Yunus AYDIN","type":"finder"}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"vulncheck"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-27T17:22:32.579274Z","id":"CVE-2025-71408","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-27T17:22:48.131Z"}}]}}}