{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-71408","id":"CVE-2025-71408","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 san","descriptionLong":"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.","published":"2026-07-24T21:07:49.610Z","updated":"2026-10-28T02:30:36.440778628Z","reserved":"2026-07-24T20:57:08.784Z","status":"Analyzed","rejected":false,"assigner":"VulnCheck","metric":{"version":"4.0","score":8.5,"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","rating":"high","source":"VulnCheck"},"metrics":[{"version":"4.0","score":8.5,"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","rating":"high","source":"VulnCheck"},{"version":"4.0","score":8.5,"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/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","rating":"high","source":"vulncheck.com"},{"version":"4.0","score":null,"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"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","rating":"high","source":"GitHub"},{"version":"4.0","score":null,"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/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","rating":"unrated","source":"OSV"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"VulnCheck"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"vulncheck.com"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["ntlk"],"affectedProducts":[{"vendor":"ntlk","product":"ntlk","defaultStatus":"affected","versions":[{"status":"affected","version":"0","versionType":"semver","lessThan":"3.9.3"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"nltk","purl":"pkg:pypi/nltk","ranges":["<3.9.3"],"fixed":["3.9.3"],"advisory":"GHSA-848c-c2cx-j7qx"}],"cwes":["CWE-95"],"aliases":["GHSA-848c-c2cx-j7qx","PYSEC-2026-3657"],"references":[{"url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","tags":["technical-description","exploit","Exploit","Press/Media Coverage","Third Party Advisory","evidence"]},{"url":"https://github.com/nltk/nltk/releases/tag/3.9.3","tags":["release-notes","patch","Release Notes","fix","web","advisory"]},{"url":"https://github.com/nltk/nltk/pull/3465","tags":["issue-tracking","patch","Issue Tracking","Patch","fix","web"]},{"url":"https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","tags":["patch","Patch","fix","web"]},{"url":"https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments","tags":["third-party-advisory","Patch","Third Party Advisory","advisory","web","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71408.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71408","tags":["advisory"]},{"url":"https://github.com/nltk/nltk","tags":["package"]},{"url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3657.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-848c-c2cx-j7qx","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00265,"epssPercentile":0.18685,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-71408","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71408","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-71408","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-848c-c2cx-j7qx","ok":true,"note":"GHSA-848c-c2cx-j7qx"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-71408","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}