Eval Injection Affecting nltk package, versions <3.9.3-1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.2% (10th 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-DEBIANUNSTABLE-NLTK-18320131
  • published27 Jul 2026
  • disclosed24 Jul 2026

Introduced: 24 Jul 2026

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

How to fix?

Upgrade Debian:unstable nltk to version 3.9.3-1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream nltk package and not the nltk package as distributed by Debian. See How to fix? for Debian:unstable 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