CVE-2026-0847: NLTK path traversal in CorpusReader classes

CVE-2026-0847 · Severity: high · CVSS 8.6 · Published 2026-03-04

A security vulnerability has been identified in NLTK, a widely used library for natural language processing and artificial intelligence. This flaw allows an attacker to bypass security restrictions and read sensitive files from the server, such as system configuration files or private keys. This is particularly dangerous for organizations using NLTK in chatbots, machine learning pipelines, or automated text analysis tools where user input might be processed.

Technologies: nltk (PyPI), Red Hat Ansible Automation Platform 2. Vendors: PyPI, Red Hat.

Quick answers

Is CVE-2026-0847 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-0847 being exploited in the wild.
How severe is CVE-2026-0847?
High severity, with a CVSS score of 8.6, published 4 March 2026.
Which products and versions are affected?
nltk (PyPI) <= 3.9.2, ECOSYSTEM:introduced=0,fixed=3.9.3, ECOSYSTEM:introduced=0,last_affected=3.9.2; Red Hat Ansible Automation Platform 2 2.
Is there a fix for CVE-2026-0847?
Yes. nltk (PyPI): upgrade to 3.9.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-0847 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-0847?
Check whether you run nltk (PyPI) or Red Hat Ansible Automation Platform 2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • nltk (PyPI): upgrade to 3.9.3 or later
    pip install "nltk>=3.9.3"

Technical details

A path traversal vulnerability exists in NLTK's CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. The root cause is a failure to properly sanitize or validate file paths provided to these classes. A remote, unauthenticated attacker can exploit this by providing crafted file paths (e.g., using '../' sequences) to traverse the directory structure and read arbitrary files on the host system. This vulnerability is especially critical in applications that process user-controlled file inputs, such as NLP pipelines or ML APIs. Red Hat has released security advisories (RHSA-2026:10184 and RHSA-2026:19712) addressing this in their OpenShift AI products.

Affected products

  • NLTK Project NLTK <= 3.9.2
  • Red Hat Red Hat OpenShift AI 2.25, 3.3
  • Red Hat Red Hat Ansible Automation Platform 2 2

Identifiers

  • CVE-2026-0847
  • GHSA-68j8-pq59-fqgm
  • PYSEC-2026-98

Timeline

  • 2026-03-04: disclosed: Vulnerability disclosed via huntr.dev
  • 2026-03-04: advisory: CVE-2026-0847 published
  • 2026-04-23: patched: Red Hat released security advisory RHSA-2026:10184

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.