Skip to main content

NLTK CVE-2026-0847

HIGH
Path Traversal (CWE-22)
2026-03-04 security@huntr.dev GHSA-68j8-pq59-fqgm
7.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify NLP API accepting file/corpus parameters
  2. Delivery
    Craft HTTP request with path traversal payload
  3. Exploit
    NLTK CorpusReader processes unsanitized path
  4. Execution
    Traverse filesystem to sensitive files
  5. Persist
    Exfiltrate SSH keys, tokens, or configs
  6. Impact
    Lateral movement or privilege escalation

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application uses NLTK CorpusReader classes (WordListCorpusReader, TaggedCorpusReader, or BracketParseCorpusReader specifically) and passes user-controlled input as file path parameters to these readers without sanitization. Most critically vulnerable are NLP APIs, chatbots, machine learning pipelines, or web applications where corpus names, file paths, or data source identifiers are derived from HTTP request parameters, API payloads, or user uploads. Default NLTK installations that only load built-in corpora from hardcoded paths are NOT vulnerable. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms no special conditions for network exploitation once the vulnerable code path exists - no authentication, user interaction, or complex setup required. Exploitation is LIMITED to environments where application logic connects external input to CorpusReader instantiation, which is deployment-specific and not universal to all NLTK users.

Impact

CVSS 7.5 (High) reflects the unauthenticated network attack vector with zero complexity and high confidentiality impact (AV:N/AC:L/PR:N/UI:N/C:H/I:N/A:N), indicating straightforward exploitation for information disclosure. However, the EPSS score of 0.25% (below median) suggests limited observed exploitation attempts, likely because successful attacks require specific deployment patterns where NLTK processes untrusted file path inputs - not universal to all NLTK installations. The huntr.com security bounty disclosure provides technical details that could accelerate exploit development. Real-world risk is HIGHEST for public-facing NLP APIs, chatbots, and ML platforms that accept user-supplied corpus names or file references without application-layer validation. The description's mention of potential RCE escalation path is concerning but not confirmed from available data - the CVSS vector shows only confidentiality impact (I:N), not integrity. Organizations should prioritize patching if NLTK handles any external input, but assess whether their specific deployment actually exposes CorpusReader functionality to untrusted sources. The 'Authentication Bypass' tag appears misapplied - this is pure path traversal, not auth bypass, though file disclosure could leak credentials enabling subsequent bypass.

Exploit ScenarioDerived

An attacker identifies a public-facing sentiment analysis API that accepts a 'corpus_name' parameter to customize language models. By submitting a crafted request with corpus_name set to '../../../etc/passwd' or '../../../home/user/.ssh/id_rsa', the attacker exploits NLTK's WordListCorpusReader to traverse directories and retrieve the file contents in the API response or error message. With SSH keys or API tokens extracted, the attacker pivots to lateral movement or account takeover. Public exploit details from the huntr.com bounty disclosure provide attackers with specific CorpusReader methods and payload examples to replicate the attack.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Apr 28, 2026

Path traversal in NLTK (Natural Language Toolkit) versions ≤3.9.2 allows remote unauthenticated attackers to read arbitrary files from the server hosting NLP applications. Multiple CorpusReader classes (WordListCorpusReader, TaggedCorpusReader, BracketParseCorpusReader) fail to sanitize file paths, enabling directory traversal to access sensitive files including SSH keys, API tokens, and system configurations. This poses critical risk in machine learning APIs, chatbots, and NLP pipelines that process user-controlled file inputs. EPSS score of 0.25% (48th percentile) suggests low widespread exploitation probability despite public disclosure via huntr.com bounty, though the unauthenticated network vector (AV:N/PR:N) and zero attack complexity make this readily exploitable once targets are identified.

Earlier versions of this analysis (1)
v1 Mar 12, 2026 - 22:05 CVSS 8.6

A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. [CVSS 8.6 HIGH]

RemediationAI

Upgrade NLTK to version 3.9.3 or later where vendor patch is available (exact patched version should be confirmed from https://huntr.com/bounties/fc69914f-36a9-4c18-8503-10013b39f966 or official NLTK release notes). As immediate mitigation for systems that cannot upgrade, implement application-layer input validation to reject file paths containing traversal sequences ('..' components, absolute paths, symbolic links) before passing to CorpusReader classes - use allowlist validation restricting corpus names to alphanumeric identifiers mapped server-side to absolute paths. Deploy filesystem-level controls such as chroot jails, containers with read-only mounts, or AppArmor/SELinux policies restricting NLTK process file access to designated corpus directories only. Note that input filtering alone may be bypassed via encoding variations (URL encoding, Unicode normalization) so defense-in-depth with OS-level restrictions is essential. Monitor file access logs for unusual patterns indicating traversal attempts. If NLTK functionality is exposed via web APIs, ensure the API gateway enforces strict schema validation on corpus identifiers. Review application architecture to eliminate scenarios where user input directly controls file path parameters to NLTK functions.

Affected Packages

pypi nltk fix: 3.9.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

NLTK (Natural Language Toolkit) is a widely-used Python library for natural language processing and computational linguistics. The vulnerability affects CorpusReader classes responsible for loading and parsing linguistic corpora from the filesystem. The root cause (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) stems from inadequate validation of file path parameters passed to these reader classes. Attackers can inject path traversal sequences (e.g., '../../../etc/passwd') in filenames or corpus identifiers, bypassing intended directory restrictions. The affected component cpe:2.3:a:nltk:nltk operates in many production environments as a backend service for text analysis, sentiment analysis, tokenization, and machine learning model preprocessing, making file system access controls critical. The vulnerability exists in core data loading functions that directly interact with the operating system's file API without canonicalization or jail restrictions.

Know when Nltk gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
SUSE 8.6 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L
Red Hat 7.5 HIGH

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

4
Analysis Updated
Apr 28, 2026 - 00:42 vuln.today
v2 - CVSS changed
CVSS changed
Apr 28, 2026 - 00:37 NVD
8.6 (HIGH) 7.5 (HIGH)
Patch released
Apr 09, 2026 - 14:30 nvd
Patch available
CVE Published
Mar 04, 2026 - 19:16 nvd
HIGH 8.6

DescriptionNVD

A vulnerability in NLTK versions up to and including 3.9.2 allows arbitrary file read via path traversal in multiple CorpusReader classes, including WordListCorpusReader, TaggedCorpusReader, and BracketParseCorpusReader. These classes fail to properly sanitize or validate file paths, enabling attackers to traverse directories and access sensitive files on the server. This issue is particularly critical in scenarios where user-controlled file inputs are processed, such as in machine learning APIs, chatbots, or NLP pipelines. Exploitation of this vulnerability can lead to unauthorized access to sensitive files, including system files, SSH private keys, and API tokens, and may potentially escalate to remote code execution when combined with other vulnerabilities.

Executive ViewAI

Why It Matters

NLTK versions 3.9.2 and earlier contain a path traversal vulnerability enabling unauthenticated remote attackers to read arbitrary files from servers, including SSH keys, API tokens, and system configurations. Organizations deploying NLTK in production NLP applications, machine learning APIs, or chatbots face immediate risk of credential exposure and sensitive data disclosure without authentication requirements.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate upgrade is unavailable: (1) Restrict network access to NLP applications to trusted IP ranges only; (2) Disable or remove CorpusReader functionality that accepts user-controlled file paths; (3) Run NLTK processes with least-privilege service accounts with minimal filesystem permissions; (4) Implement Web Application Firewall rules to block path traversal patterns (../, ..\ sequences) in input parameters.

Threat Intelligence Overview

EPSS Score
0.2%
Top 52% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS GHSA Vendor VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

Affected Products (CPE)NVD

cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*

More in Nltk

View all
CVE-2026-79657 CRITICAL POC
9.3 Aug 25

Arbitrary code execution in the Natural Language Toolkit (NLTK) before 3.10.3 allows attackers to bypass the library's p

CVE-2026-78683 CRITICAL POC
9.4 Aug 25

Arbitrary code execution in NLTK (Natural Language Toolkit) through 3.9.4 allows attackers to run Python code when a vic

CVE-2025-14009 HIGH POC
8.8 Feb 18

Arbitrary code execution in the NLTK (Natural Language Toolkit) Python library affects all versions through its data dow

CVE-2026-63312 HIGH POC
8.7 Aug 22

StreamBackedCorpusView in NLTK before 3.10.0 allows arbitrary local file reads by calling Python's builtins.open() direc

CVE-2026-62384 HIGH POC
8.7 Aug 22

Symlink-based path traversal in NLTK's FramenetCorpusReader before version 3.10.2 permits attackers with write access to

CVE-2026-66393 HIGH POC
8.7 Aug 22

Unbounded recursion in NLTK's JSONTaggedDecoder.decode_obj() (nltk/jsontags.py) allows unauthenticated remote attackers

CVE-2026-62388 HIGH POC
8.7 Aug 22

Path traversal and pickle deserialization protections in NLTK before 3.10.0 are effectively disabled by default - pathse

CVE-2026-78681 HIGH POC
8.7 Aug 25

XML Entity Expansion (Billion Laughs) in NLTK before 3.10.3 allows unauthenticated remote attackers to cause denial of s

CVE-2026-78682 HIGH POC
8.7 Aug 25

Server-side request forgery in NLTK before 3.10.3 allows unauthenticated remote attackers to reach internal HTTP service

CVE-2026-70626 HIGH POC
8.6 Aug 22

Symlink escape in NLTK's CorpusReader.open() allows local attackers to read arbitrary files outside the designated corpu

CVE-2026-62385 HIGH POC
8.2 Aug 22

Path traversal in NLTK's FramenetCorpusReader and NKJPCorpusReader (all versions before 3.10.0) enables unauthenticated

CVE-2021-43854 HIGH POC
7.5 Dec 23

NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research a

Vendor StatusVendor

SUSE

Severity: High
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy