# NLTK Downloader hardlink filesystem containment bypass

Source: https://junglewise.ai/threats/nltk-downloader-hardlink-filesystem-containment-bypass-522cb97d  
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

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

NLTK is a natural language processing library used by developers to build text analysis applications. A vulnerability in its downloader component allows attackers with write access to a shared downloader directory to overwrite arbitrary files outside the intended installation directory by creating hardlinks. This could lead to unauthorized modification of system files or application data, compromising system integrity and availability.

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

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.1, published 27 August 2026.

**Which products and versions are affected?** nltk (PyPI) <= 3.10.2.

**Is there a fix for This vulnerability?** A patch was published on 2026-08-12: Fix included in version 3.10.3 or later Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked with local access.

**Am I affected?** 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.

## Technical details

The vulnerability is a link-following / filesystem containment bypass (CWE-59) in NLTK's package downloader. The Downloader.download and Downloader.incr_download methods properly validate symlinks and traversal conditions during ZIP extraction but fail to validate pre-existing hardlinks within the install tree. An attacker with write access to a shared downloader root on the same filesystem can create a hardlink pointing to an outside-root target file, and when a legitimate package is extracted, the data is written through the hardlink alias, overwriting the external file. The attack requires local filesystem access and low privileges. Patched versions (3.10.3+) address this by treating pre-existing hardlinks as unsafe extraction targets and validating inode-level containment.

## Affected products

- NLTK Project NLTK <=3.10.2

## Timeline

- 2026-08-12: disclosed
- 2026-08-27: advisory
- 2026-08-12: patched: Fix included in version 3.10.3 or later

## References

- [https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672](https://github.com/nltk/nltk/security/advisories/GHSA-f794-5jv7-7672)
- [https://www.vulncheck.com/advisories/nltk-before-3.10.3-hardlink-file-overwrite-via-downloader](https://www.vulncheck.com/advisories/nltk-before-3.10.3-hardlink-file-overwrite-via-downloader)

## 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 Pl196xCorpusReader quadratic ReDoS on malformed TEI blocks](https://junglewise.ai/threats/nltk-pl196xcorpusreader-quadratic-redos-on-malformed-tei-blocks-8473e6ef)
- [NLTK path traversal in model-artifact APIs via pathsec bypass](https://junglewise.ai/threats/nltk-path-traversal-in-model-artifact-apis-via-pathsec-bypass-a4651c73)
