# CVE-2026-81727: NLTK Downloader hardlink traversal in file extraction

Source: https://junglewise.ai/threats/cve-2026-81727-nltk-downloader-hardlink-traversal-in-file-extraction  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-27. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-81727 · Severity: high · CVSS 7.1 · Published 2026-08-27

NLTK is a popular Python library for natural language processing that includes a downloader for fetching language models and datasets. The downloader extracts packages to a configurable directory but fails to prevent overwriting files outside that directory via hardlinks. On systems where users share a common downloader cache directory, an attacker with write access can craft malicious hardlinks to overwrite sensitive files, potentially compromising system integrity or other users' data.

Technologies: [nltk (PyPI)](https://junglewise.ai/threats/technologies/nltk). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-81727 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-81727 being exploited in the wild.

**How severe is CVE-2026-81727?** High severity, with a CVSS score of 7.1, published 27 August 2026.

**Which products and versions are affected?** nltk (PyPI) <= 3.10.2, ECOSYSTEM:introduced=0,fixed=3.10.3.

**Is there a fix for CVE-2026-81727?** Yes. nltk (PyPI): upgrade to 3.10.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81727 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-81727?** Check whether you run nltk (PyPI) 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.10.3 or later

  ```sh
  pip install "nltk>=3.10.3"
  ```


## Technical details

This is a filesystem containment bypass vulnerability in the `nltk.downloader.Downloader.download()` and `nltk.downloader.Downloader.incr_download()` methods. The downloader validates and rejects symlinks at extraction targets but treats pre-existing hardlinks as ordinary in-root files, allowing writes through the hardlink to mutate inodes outside the install tree. The attack requires the attacker to plant files in a writable shared downloader root on the same filesystem as the target, then trigger extraction of a package whose member lands on the hardlink path. The vulnerability affects NLTK versions through 3.10.2 and is patched in 3.10.3. Successful exploitation results in arbitrary file overwrite with integrity and availability impact on the vulnerable system.

## Affected products

- NLTK Project NLTK through 3.10.2

## Identifiers

- CVE-2026-81727
- GHSA-f794-5jv7-7672
- PYSEC-2026-3741

## Timeline

- 2026-08-12: disclosed
- 2026-09-02: advisory
- 2026-08-28: patched: Patch released as v3.10.3

## References

- [https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672](https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672)
- [https://github.com/nltk/nltk/pull/3797](https://github.com/nltk/nltk/pull/3797)
- [https://github.com/nltk/nltk/commit/9e6d5f05902b9aaa1221a0a565448d17a9c9b3e8](https://github.com/nltk/nltk/commit/9e6d5f05902b9aaa1221a0a565448d17a9c9b3e8)
- [https://github.com/nltk/nltk/releases/tag/v3.10.3](https://github.com/nltk/nltk/releases/tag/v3.10.3)
- [https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3741.yaml](https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3741.yaml)

## Related threats

- [NLTK WekaClassifier path traversal in model validation](https://junglewise.ai/threats/cve-2026-109956-nltk-through-3-10-3-contains-a-path-traversal-vulnerability-in)
- [NLTK RecursiveDescentParser uncontrolled recursion denial of service](https://junglewise.ai/threats/cve-2026-12876-nltk-recursivedescentparser-uncontrolled-recursion-denial-of)
- [NLTK tgrep regular expression denial of service](https://junglewise.ai/threats/nltk-tgrep-regular-expression-denial-of-service-02fca1b2)
- [NLTK Downloader hardlink filesystem containment bypass](https://junglewise.ai/threats/nltk-downloader-hardlink-filesystem-containment-bypass-522cb97d)
- [NLTK Pl196xCorpusReader quadratic ReDoS on malformed TEI blocks](https://junglewise.ai/threats/nltk-pl196xcorpusreader-quadratic-redos-on-malformed-tei-blocks-8473e6ef)
