Uncontrolled Search Path Element Affecting nltk package, versions [,3.10.4)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.17% (4th 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-PYTHON-NLTK-22733173
  • published22 Nov 2026
  • disclosed19 Nov 2026
  • creditzx (Jace), manus-use

Introduced: 19 Nov 2026

NewCVE-2026-129234  (opens in a new tab)
CWE-426  (opens in a new tab)
CWE-427  (opens in a new tab)

How to fix?

Upgrade nltk to version 3.10.4 or higher.

Overview

nltk is a Natural Language Toolkit (NLTK) is a Python package for natural language processing.

Affected versions of this package are vulnerable to Uncontrolled Search Path Element via Prover9Parent.config_prover9(binary_location=...) (and Mace, which inherits it) accepting a relative binary_location and passing it as path_to_bin to find_binary, which disables the CWD-relative rejection guard in internals.py. A truthy path_to_bin sets searching_bare_name to False, so the guard if searching_bare_name and not os.path.isabs(path): continue never executes, allowing a relative path such as ./prover9 to be stored in self._prover9_bin. On the next prove() call, _call passes that relative path to subprocess.Popen, executing the attacker-planted binary from the current working directory as the invoking user.

Note: This is only exploitable when the application is configured with a relative binary_location and the attacker can write to the resolved directory.

PoC

In a directory containing an executable ./prover9:

from nltk.inference.prover9 import Prover9
p = Prover9(); p.config_prover9(binary_location='.')
# p._prover9_bin == './prover9'; subsequent prove() Popens it from CWD

Runtime-confirmed: find_binary('prover9', path_to_bin='.') → './prover9'; bare find_binary('prover9') and relative PROVER9='.' via default _find_binary both raise LookupError (the default path is protected).

CVSS Base Scores

version 4.0
version 3.1