CVE-2025-71408CWE-95

CVE-2025-71408

High · published July 25, 2026

CVSS v3.1
7.8
EPSS
0%
Percentile
17.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00265 · 17.5th percentile
Weakness
CWE-95 · Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
Published
2026-07-25T02:16Z
Affected products (1)
ProductVersionsFixed in
nltk/nltk< 3.9.33.9.3
References (5)
EPSS history
Timeline
  • 24 JUL 21:07Z
    NLTK < 3.9.3 Eval Injection via collocations.py Command-Line Arguments
    cvelistv5