CVE-2026-12261: Nltk Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-ffj6-66c4-86gw
CVSS 5.3
CWE-284
Published
Advisory Summary

CVE-2026-12261 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-284: Improper Access Control) affecting Nltk libraries in the PyPI ecosystem. The issue involves nltk downloader allows cross-package resource and model poisoning. Remediation is available by upgrading affected packages to version 3.10.0.

CVE-2026-12261 at a Glance

CVE Identifier CVE-2026-12261
GHSA Identifier GHSA-ffj6-66c4-86gw
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-284: Improper Access Control
Affected Product Nltk
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2026-12261

To remediate this vulnerability, upgrade all affected Nltk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

nltk fixed: 3.10.0
pip install nltk>=3.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show nltk

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-12261, inspect your installed packages using pip:

pip show nltk

Analyze the terminal output to locate any version of Nltk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.10.0), your application is affected.

Note: The pip show nltk command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Nltk, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-12261 Affected Nltk Versions

1 component(s)
Fixed Versions:
3.10.0
Product / Package Ecosystem Affected Versions Fixed Version
nltk
PyPI
< 3.10.0
3.10.0

References

Frequently Asked Questions

What is CVE-2026-12261?
CVE-2026-12261 is a security vulnerability in Nltk involving NLTK downloader allows cross-package resource and model poisoning under CWE-284: Improper Access Control.
Which Nltk versions are affected?
Affected versions include releases prior to 3.10.0 across affected packages: nltk.
What version fixes CVE-2026-12261?
Upgrading to 3.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is nltk affected?
Yes, nltk is affected in releases prior to 3.10.0. Upgrade your dependency to 3.10.0 or later.
What is the CVSS score of CVE-2026-12261?
CVE-2026-12261 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2026-12261?
CVE-2026-12261 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check PyPI dependencies for CVE-2026-12261?
Run the dependency tree command: 'pip show nltk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ffj6-66c4-86gw",
  "modified" : "2026-10-02T23:09:22Z",
  "published" : "2026-08-07T09:31:52Z",
  "aliases" : [ "CVE-2026-12261" ],
  "summary" : "NLTK downloader allows cross-package resource and model poisoning",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "nltk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-12261"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nltk/nltk/pull/3625"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nltk/nltk/commit/7a5740af89feeb739193db766e11e85dfe78339c"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nltk/nltk"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nltk/nltk/releases/tag/v3.10.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/nltk/PYSEC-2026-3954.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/8b8c381e-08a8-4e4f-bb46-a320c96a364f"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-284" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-02T23:09:22Z",
    "nvd_published_at" : "2026-08-07T07:16:26Z"
  }
}