Eval Injection Affecting nltk package, versions [,3.9.3)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.18% (9th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Eval Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-NLTK-18313041
  • published26 Jul 2026
  • disclosed24 Jul 2026
  • creditYunus Aydın

Introduced: 24 Jul 2026

NewCVE-2025-71408  (opens in a new tab)
CWE-95  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.9.3 or higher.

Overview

nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

Affected versions of this package are vulnerable to Eval Injection via the __main__ process in collocations.py when command-line arguments are passed directly to the eval function without proper validation or sanitization. An attacker can execute arbitrary Python code, including operating system commands, by supplying crafted command-line arguments.

CVSS Base Scores

version 4.0
version 3.1