Eval Injection Affecting nltk package, versions *


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. 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 IDSNYK-ECHOLATEST-NLTK-18321531
  • published27 Jul 2026
  • disclosed24 Jul 2026

Introduced: 24 Jul 2026

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

How to fix?

There is no fixed version for Echo:latest nltk.

NVD Description

Note: Versions mentioned in the description apply only to the upstream nltk package and not the nltk package as distributed by Echo. See How to fix? for Echo:latest relevant fixed versions and status.

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 Base Scores

version 3.1