All vulnerabilities

PyPI

CVE-2026-126296

NLTK: Path Traversal in save_maxent_params / load_maxent_params Allow Arbitrary File READ/WRITE

Severity
Medium 6.3
Published
13 Nov 2026
Last changed
18 Nov 2026
Added to UpHeron
23 Nov 2026
Fixed in
3.10.4
Exploit chance
0.4% in the next 30 daysHigher than 31% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
CWE-73Path traversal (CWE-22)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Change some data · Slow it down
CVSS vector
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
Also known as
GHSA-59f9-gqg8-mqpj
Sources
CVE Program, OSV.dev and GitHub

Description

Path traversal in NLTK's save_maxent_params() and load_maxent_params() allows arbitrary file write and arbitrary file read outside the directories permitted by NLTK's pathsec security mechanism.

This vulnerability was previously reported through Huntr, accepted by the NLTK project, and assigned CVE-2026-15367. A $750 bounty was paid through Huntr (i didnt get the fix bounty). Huntr subsequently shut down its OSS vulnerability program, so I am submitting this report through GitHub to continue the existing disclosure process and preserve the original CVE assignment and researcher credit.

The affected functions are:

  • nltk.classify.maxent.load_maxent_params()
  • nltk.classify.maxent.save_maxent_params()

Both functions construct filesystem paths from the caller-controlled tab_dir argument and access them using Python's built-in open() without passing the paths through NLTK's pathsec validation.

For example, load_maxent_params() constructs and opens:

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
nltkPyPI · osv:PyPI:nltk
  • Every version before 3.10.4

About nltk

Weekly downloads (PyPI)
11,948,568PyPI Stats, 23 Nov 2026

References