Directory Traversal Affecting nltk package, versions <3.8.1-1ubuntu0.1~esm2


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.55% (46th 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-UBUNTU2404-NLTK-15445030
  • published29 Mar 2026
  • disclosed9 Mar 2026

Introduced: 9 Mar 2026

CVE-2026-0846  (opens in a new tab)
CWE-36  (opens in a new tab)

How to fix?

Upgrade Ubuntu:24.04 nltk to version 3.8.1-1ubuntu0.1~esm2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream nltk package and not the nltk package as distributed by Ubuntu. See How to fix? for Ubuntu:24.04 relevant fixed versions and status.

A vulnerability in the filestring() function of the nltk.util module in nltk version 3.9.2 allows arbitrary file read due to improper validation of input paths. The function directly opens files specified by user input without sanitization, enabling attackers to access sensitive system files by providing absolute paths or traversal paths. This vulnerability can be exploited locally or remotely, particularly in scenarios where the function is used in web APIs or other interfaces that accept user-supplied input.

CVSS Base Scores

version 3.1