CVE-2025-71408

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.

Severity
HIGH
CVSS v3
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H · source cna
CVSS v4
8.5
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N · source cna
Exploit chance (EPSS)
0.265%
chance of exploitation in the next 30 days
higher than 18.6% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
Yes
Exploit references (NVD and CNA): 1
Metasploit modules: 0
Nuclei templates: 0

Weakness

CISA SSVC decision points

Exploitationpoc
Automatableno
Technical impacttotal
Scored2026-07-27

Timeline

  1. 2026-07-24Published by the CNA21:07 UTC
  2. 2026-07-25GitHub advisory published (GHSA-848c-c2cx-j7qx)1 day after publication
  3. 2026-07-27CISA SSVC decision recorded3 days after publication

The timeline shows what already happened. To be told when this CVE changes next, watch it from the API.

Exploit and advisory records

GitHub advisory GHSA-848c-c2cx-j7qx, affected packages:

PackageVulnerable versionsFixed in
PyPI nltkbefore 3.9.33.9.3

Affected products

Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.

ProductVulnerable versionsFixed in
nltk nltkbefore 3.9.3fixed in 3.9.33.9.3

Products and versions as NVD and the vendor that published the CVE list them.

References

Get more CVE data from the API.

Free without a key or signup. Pro adds monitoring and higher limits: pricing.

Sources