Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2025-71408

nltk: NLTK: Arbitrary Code Execution via Eval Injection in Collocations Module

Overview

Published
24 Jul 2026
Modified
8 Oct 2026
High CVE
1 Registry packages
1 OS packages
2 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

7.8 · HIGH

CVSS 3.1 base score, scored by NVD.

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weakness: CWE-95

Affected packages · 1

Packages affected by CVE-2025-71408
EcosystemPackageVulnerableFixed in
PyPI nltk <3.9.3 3.9.3

Open a package to see all its vulnerabilities.

Operating systems · 5 fixes

debian 4 releases · 1 package

affected 3 fixed 1
nltk
debian fixes for CVE-2025-71408
ReleasePackageFixed in
11 nltk affected
12 nltk affected
13 nltk affected
14 nltk 3.9.3-1

echo 1 release · 1 package

affected 1
nltk
echo fixes for CVE-2025-71408
ReleasePackageFixed in
nltk affected

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.