Nltk nltk/nltk
Path Traversal in nltk/nltk
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.
Affected versions and mitigation
From the CVE record, GitHub Security Advisories and the vendor's references.Affected
- >= unspecified, <= latest
Mitigation
Upgrade nltk to 3.9.3 or later.
Timeline
Days relative to CVE publicationFirst public PoC 25 days after publication; not in CISA KEV. First PoC: HyperPS/CVE-2026-0847 (created 29 Mar 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| HyperPS/CVE-2026-0847 | 29 Mar 2026 +25 d | 0 | PoC via PoC Index |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
PoC characteristics
What to hunt for in your logs · from 1 PoC repoPOST /read
- Body markers
"file":"etc/passwd"inapplication/json- Ports
- 8000
- Seen in
- 1 repo: HyperPS/CVE-2026-0847
- Evidence
- HyperPS/CVE-2026-0847/README.md:136
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/read(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [8000] (msg:"GG PoC-Monitor CVE-2026-0847 nltk nltk/nltk exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/read"; http.request_body; content:"|22|file|22|:|22|etc/passwd|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-0847; classtype:web-application-attack; sid:9598861; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: nltk nltk/nltk exploit attempt (CVE-2026-0847)
id: gg-pocmon-cve-2026-0847-9598861
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-0847. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-0847
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/read'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: high
tags:
- attack.initial_access
- attack.t1190
- cve.2026.0847