Skip to content
Threat Feed
high advisory

Path Traversal in NLTK WekaClassifier

NLTK versions up to 3.10.3 contain a path traversal vulnerability in the WekaClassifier component that allows attackers to probe or write files outside of defined data roots.

CVE search metadata

CVE search record: CVE-2026-109956. Severity: high. CVSS: 7.0. KEV: no. Product: NLTK (<= 3.10.3). Brief: Path Traversal in NLTK WekaClassifier. Brief link: https://feed.craftedsignal.io/briefs/2026-10-nltk-path-traversal/

NLTK (Natural Language Toolkit) versions through 3.10.3 are affected by a path traversal vulnerability residing within the WekaClassifier component. The flaw exists because the library fails to properly validate input provided to the 'model_filename' or 'model' arguments before processing them. An attacker capable of influencing these arguments can bypass the 'nltk.pathsec' containment mechanism. By manipulating the paths, the underlying Weka Java Virtual Machine (JVM) instance can be forced to read ('-l') or write ('-d') files in locations outside the intended application data directory. This vulnerability provides a vector for unauthorized file access or potential configuration file overwriting, depending on the environment where the NLTK application is running.

Impact

Successful exploitation allows for unauthorized file system interactions, including probing for sensitive files or overwriting critical files on the underlying host system. This vulnerability affects any Python application utilizing the NLTK WekaClassifier module with user-supplied input.

Recommendation

  • Update NLTK to a version beyond 3.10.3 immediately upon the availability of a patch.
  • Review applications using the WekaClassifier component to ensure that the 'model_filename' or 'model' parameters are not sourced from untrusted or user-supplied input.
  • Implement strict filesystem permission controls for the service account running the Python application to limit the impact of potential directory traversal.

Mitigations

Upgrade NLTK to a patched version beyond 3.10.3

immediate IT Operations

CVE-2026-109956