{"cve":"CVE-2025-71408","nvd":{"published":"2026-07-24T22:16:50.063","modified":"2026-10-08T16:16:53.740","status":"Analyzed","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.","cvss_v4":{"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","score":8.5},"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8},"cwes":["CWE-95"],"references":["https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","https://github.com/nltk/nltk/pull/3465","https://github.com/nltk/nltk/releases/tag/3.9.3","https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments"],"products":["nltk:nltk"],"source":"nvd","synced_at":"2026-10-19T22:46:40.600842820+00:00"},"epss":{"cve":"CVE-2025-71408","score":0.00265,"percentile":0.18272,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-848c-c2cx-j7qx","url":"https://osv.dev/vulnerability/GHSA-848c-c2cx-j7qx","summary":"NLTK vulnerable to Eval Injection via collocations CLI arguments","modified":"2026-08-12T19:59:11.940439452Z","packages":[{"ecosystem":"PyPI","name":"nltk","purl":"pkg:pypi/nltk","ranges":["<3.9.3"],"fixed":["3.9.3"]}]},{"id":"PYSEC-2026-3657","url":"https://osv.dev/vulnerability/PYSEC-2026-3657","summary":"","modified":"2026-08-19T12:15:03.319052318Z","packages":[{"ecosystem":"PyPI","name":"nltk","purl":"pkg:pypi/nltk","ranges":["<3.9.3"],"fixed":["3.9.3"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}