CVE-2026-12261: Nltk Remote Code Execution Vulnerability
MODERATECVE-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
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).
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.
pip install nltk>=3.10.0
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
CVE-2026-12261 Affected Nltk Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nltk
|
PyPI |
< 3.10.0
|
3.10.0
|
References
Frequently Asked Questions
What is CVE-2026-12261?
Which Nltk versions are affected?
What version fixes CVE-2026-12261?
Is nltk affected?
What is the CVSS score of CVE-2026-12261?
What CWE is associated with CVE-2026-12261?
How can I check PyPI dependencies for CVE-2026-12261?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}