{"schemaVersion":3,"id":"CVE-2025-71408","aliases":["GHSA-848c-c2cx-j7qx","PYSEC-2026-3657","UBUNTU-CVE-2025-71408","DEBIAN-CVE-2025-71408"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2026-07-24T21:07:49.610Z","modified":"2026-10-08T15:21:35.203Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":8.5,"severity":"high","version":"4.0","versionLabel":"v4.0","source":"CVE.org","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","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":8.5,"severity":"high","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Pypi","score":8.5,"severity":"high","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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":8.5,"severity":"high","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","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":4.6,"impact":9.8,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Debian","score":8.5,"severity":"high","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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":8.5,"severity":"high","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","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.8,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00265,"percentile":0.17305,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.067,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00198},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00265,"percentile":0.17305}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00198,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00265,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00265,"percentile":0.17305}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_29A285F4B1B71B91","name":"Exploit Reference (aydinnyunus.github.io)","source":"reference","url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-95","name":"Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')","description":"The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. \"eval\").","type":"weakness","status":"Incomplete","abstraction":"Variant","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/95.html"}],"affected":[{"vendor":"debian","product":"nltk","name":"nltk","label":"nltk","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/nltk","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 3.9.3-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 3.9.3-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"nltk","name":"nltk","label":"nltk","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/nltk","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"nltk","product":"nltk","name":"nltk","label":"nltk","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.9.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.9.3","eol":null,"hubHref":"/vendor/nltk/nltk"},{"vendor":"ntlk","product":"ntlk","name":"ntlk","label":"ntlk","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.9.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.9.3","eol":null,"hubHref":"/vendor/ntlk/ntlk"},{"vendor":"PyPI","product":"nltk","name":"nltk","label":"nltk","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/nltk","purlType":"pypi","versions":[{"text":"< 3.9.3","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.9.3","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","label":"aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval/","hostname":"aydinnyunus.github.io","tags":["Technical Description","Exploit","EVIDENCE","REPORT","Press/Media Coverage","Third Party Advisory"]},{"url":"https://github.com/nltk/nltk/releases/tag/3.9.3","label":"github.com/nltk/nltk/releases/tag/3.9.3","hostname":"github.com","tags":["Release Notes","Patch","WEB","Advisory","REPORT"]},{"url":"https://github.com/nltk/nltk/pull/3465","label":"github.com/nltk/nltk/pull/3465","hostname":"github.com","tags":["Issue Tracking","Patch","WEB","FIX","REPORT"]},{"url":"https://github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","label":"github.com/nltk/nltk/commit/66f14096d952ec8f04934f515e027534bd4eb0ac","hostname":"github.com","tags":["Patch","WEB","FIX","REPORT"]},{"url":"https://www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments","label":"www.vulncheck.com/advisories/nltk-eval-injection-via-collocations-py-command-line-arguments","hostname":"www.vulncheck.com","tags":["Third Party Advisory","WEB","FIX","REPORT","Patch"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-71408","label":"nvd.nist.gov/vuln/detail/CVE-2025-71408","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval","label":"aydinnyunus.github.io/2026/06/07/command-injection-nltk-collocations-eval","hostname":"aydinnyunus.github.io","tags":["WEB"]},{"url":"https://github.com/nltk/nltk","label":"github.com/nltk/nltk","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3657.yaml","label":"github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3657.yaml","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/advisories/GHSA-848c-c2cx-j7qx","label":"github.com/advisories/GHSA-848c-c2cx-j7qx","hostname":"github.com","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-71408","label":"ubuntu.com/security/CVE-2025-71408","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-71408","label":"www.cve.org/CVERecord?id=CVE-2025-71408","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-71408","label":"security-tracker.debian.org/tracker/CVE-2025-71408","hostname":"security-tracker.debian.org","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-07-24T21:07:49.610Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-10-08T15:21:35.203Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":44,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T22:43:57.536Z","stale":false,"partial":false}}