Bug 2506944 (CVE-2025-71408) - CVE-2025-71408 nltk: NLTK: Arbitrary Code Execution via Eval Injection in Collocations Module
Summary: CVE-2025-71408 nltk: NLTK: Arbitrary Code Execution via Eval Injection in Col...
Keywords:
Status: NEW
Alias: CVE-2025-71408
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2528394 2528395
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-24 22:01 UTC by OSIDB Bzimport
Modified: 2026-09-04 04:29 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-24 22:01:29 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.