CVE-2026-12261

Improper Access Control in nltk/nltk

Published Aug 7, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
Description
A vulnerability in `nltk.downloader` in nltk/nltk versions <= 3.9.4 allows for cross-package resource and model poisoning. The downloader extracts package archives into shared namespaces such as `corpora/` and `taggers/` instead of package-isolated roots, and validates package integrity only after the archive has been written and extracted. This design flaw enables one package to overwrite another package's trusted resources within the same namespace, making the changes immediately active through ordinary NLTK APIs. This issue persists across fresh interpreter restarts and can affect downstream workflows, including machine learning pipelines and reproducibility-sensitive environments.

Analysis

AI-generated

Technical impact

A flaw in the nltk downloader allows a package to write files into shared namespaces such as corpora/ and taggers/ without isolation, and the integrity check occurs only after extraction. This permits one package to overwrite another package’s trusted resources, injecting malicious or altered data that is immediately usable through normal NLTK APIs. The injected resources can alter text‑processing results, affect downstream machine learning pipelines, and compromise the reproducibility of experiments that rely on stable corpus and tagger contents.

Affected Systems

The vulnerability is present in nltk/nltk up to and including version 3.9.4. Any environment that loads these versions of the library, whether in a local script, a server application, or a data‑science notebook, is potentially impacted. No specific operating system or deployment model is mentioned, so the issue applies broadly wherever the vulnerable library is installed.

Risk and Exploitability

With a CVSS score of 6.5 the risk is moderate; the EPSS score is present and indicates a very low exploitation probability (<1%), and the vulnerability is not in the CISA KEV catalog. The design flaw implies that an attacker who can influence the package download process—for example, by introducing a malicious package to an untrusted or compromised repository—can replace trusted model or corpus files. The changes persist across interpreter restarts, so the impact is durable. The attack vector is inferred to be local or via compromised package source rather than from an external network port.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade python‑nltk to any release newer than 3.9.4 to remove the flawed downloader implementation
  • Before upgrading, clear or validate the contents of the corpora/ and taggers/ directories to ensure no poisoned files remain
  • Configure your environment to use isolated resource directories or maintain a minimal set of trusted packages, and verify integrity checks before extraction

Generated by OpenCVE AI on September 4, 2026 at 17:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-ffj6-66c4-86gw NLTK downloader allows cross-package resource and model poisoning
History
Type Values Removed Values Added
First Time appeared Nltk nltk
CPEs cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
Vendors & Products Nltk nltk
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}

cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Type Values Removed Values Added
Weaknesses CWE-367
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Nltk
Nltk nltk/nltk
Vendors & Products Nltk
Nltk nltk/nltk
Type Values Removed Values Added
Description A vulnerability in `nltk.downloader` in nltk/nltk versions <= 3.9.4 allows for cross-package resource and model poisoning. The downloader extracts package archives into shared namespaces such as `corpora/` and `taggers/` instead of package-isolated roots, and validates package integrity only after the archive has been written and extracted. This design flaw enables one package to overwrite another package's trusted resources within the same namespace, making the changes immediately active through ordinary NLTK APIs. This issue persists across fresh interpreter restarts and can affect downstream workflows, including machine learning pipelines and reproducibility-sensitive environments.
Title Improper Access Control in nltk/nltk
Weaknesses CWE-284
References
Metrics cvssV3_0

{'score': 5.3, 'vector': 'CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N'}

Weaknesses
  • CWE-284

    Improper Access Control

  • CWE-367

    Time-of-check Time-of-use (TOCTOU) Race Condition

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Aug 7, 2026, 3:27 PM
Reserved
Jun 15, 2026, 10:13 AM
Status
Analyzed
Published
Aug 7, 2026, 7:16 AM
Modified
Oct 23, 2026, 9:10 PM
Severity
Moderate
Public date
Aug 7, 2026, 6:25 AM