Advisory details:
gitlab / pypi/nltk/CVE-2026-12072
| Advisory ID | gitlab/pypi/nltk/CVE-2026-12072 |
| Aliases |
CVE-2026-12072
GHSA-6hm5-jgcp-p838 |
| Summary | Natural Language Toolkit (NLTK): Path Traversal in NKJPCorpusReader leads to Arbitrary File Read and bypasses the nltk.pathsec sandbox (ENFORCE=True) A path-traversal vulnerability in `NKJPCorpusReader` allows an attacker who can influence the `fileids` argument of its public read methods (`header`, `raw`, `words`, `sents`, `tagged_words`) to read files outside the corpus root. The reader builds the file path with no containment check and opens it with the builtin `open()`, so it bypasses NLTK's `nltk.pathsec` sandbox — including the strict `ENFORCE = True` mode that `SECURITY.md` recommends for web/multi-tenant deployments. `header()` returns the parsed content of the out-of-root file to the caller (arbitrary file read). |
| Status | Published |
| Exploitability | 0.5 |
| Weighted Severity | 0.0 |
| Risk | |
| Affected and Fixed Packages | Package Details |
| Introduced and Fixed Package Commit Patches | Package Commit Patches Details |
| System | Score | Found at |
|---|---|---|
| cvssv3.1 | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/pypi/nltk/CVE-2026-12072.yml |
| Reference id | Reference type | URL |
|---|---|---|
| https://github.com/advisories/GHSA-6hm5-jgcp-p838 | ||
| https://github.com/nltk/nltk/security/advisories/GHSA-6hm5-jgcp-p838 | ||
| https://nvd.nist.gov/vuln/detail/CVE-2026-12072 |
No EPSS data available for this advisory.
| Patch URL | |
|---|---|
| There are no known patches. | |
| Attack Vector (AV) | Attack Complexity (AC) | Privileges Required (PR) | User Interaction (UI) | Scope (S) | Confidentiality Impact (C) | Integrity Impact (I) | Availability Impact (A) |
|---|---|---|---|---|---|---|---|
network adjacent_network local physical |
low high |
none low high |
none required |
unchanged changed |
high low none |
high low none |
high low none |
There are no SSVC decisions available.