{"vuln_id":"CVE-2026-128136","aliases":["GHSA-c59x-vh6j-3w8v","GHSA-m396-3h67-vpfv","GHSA-rv69-j573-cm47"],"description":"nltk: nltk: Unauthorized file access via unsafe deserialization in model loading","published_at":"2026-11-19T17:50:44Z","modified_at":"2026-11-22T21:00:05.577795Z","first_seen_at":"2026-11-21T19:15:15.262569Z","severity":"medium","severity_source":"nvd","cvss_score":6.1,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","cwe":["CWE-502"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.00244,"epss_percentile":0.15701,"nvd_status":"Awaiting Analysis","enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-128136"},"matched_alias":null,"items":[{"id":10691,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-c59x-vh6j-3w8v: NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinks","summary":"NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinks\n\n### Summary\n\n`nltk.picklesec.allowlisted_pickle_load` keyed its denylist of dangerous globals by export name, so numpy's file-I/O callables that live in submodules and are not re-exported under `__module__ == \"numpy\"` were never matched. Under the broad `allowed_modules=(\"numpy\", \"scipy\", \"sklearn\")` allowance that `TransitionParser.parse(depgraphs, modelFile)` granted for model files, a crafted protocol 4 pickle could name `numpy.lib._npyio_impl.recfromtxt` (arbitrary file read, result returned to the caller of `allowlisted_pickle_load`) or `numpy.lib.format.open_memmap` (attacker-chosen file create), and the REDUCE opcode invoked them during the load.\n\n### Affected\n\nnltk >= 3.10.0 and <= 3.10.3 (the allowlisting unpickler and the `TransitionParser` model path); numpy must be installed.\n\n### Reproduction\n\nA pickle whose REDUCE names `numpy.lib._npyio_impl.recfromtxt` with a target path, loaded through `allowlisted_pickle_load(data, allowed_modules=(\"numpy\",))`, reads that file on v3.10.3; one naming `numpy.lib.format.open_memmap` with mode `w+` creates a file. Both are refused on develop with `UnpicklingError: global '...' is from a denied module`. The maintainer transcript below shows the before and after runs.\n\n### Impact\n\nFile read and file create on the host that loads an untrusted model through NLTK's allowlisting unpickler. No code execution: this sits below the `TransitionParser` code-execution sibling GHSA-m396-3h67-vpfv, which is why the severity was reassessed to Medium (see the reply below).\n\n_Editorial note (2026-10-10): the report body of this advisory had been overwritten with the text of GHSA-rv69-j573-cm47 (the nested gzip decompression bomb). The summary above was reconstructed by the maintainers from the title, the maintainer reply, the CVSS justification and PR #3757; the original reporter text is not recoverable from the record._\n\n---\n\n## Fix status (2026-09-28)\n\nStatus: MERGED on develop (unreleased; v3.10.3 of 2026-08-12 predates the fix).\n\nPR: #3778 \"Bound decompression entry points in nltk (zip/gzip layers + pathsec.ZipFile + weka), CWE-409\", merged 2026-08-25, merge commit 42d99b7a2 on develop. Fix commits: b6e0cedca (the nested gzip layer of a zip .gz member is bounded) and c6fe98211 (the decompression guards stream instead of buffering whole payloads).\n\nProbe: none. The advisory PoC re-run on develop 2fa3f48fe (256 MiB of zeros gzipped into a STORED zip member declared at about 256 KiB, read through nltk.data.find().open().read()): refused with ValueError \"Refusing to decompress suspected gzip bomb 'corpus/bomb.gz': it expands beyond nltk.data.MAX_UNZIP_RATIO=1000\".\n\nRelease: none yet; no release tag contains b6e0cedca.\n\n---\n\n## Maintainer reply (2026-09-28)\n\nStatus: fixed on develop, unreleased.\n\n### Fix verified\n\nThe numpy submodule file I/O sinks named in this report are denied on develop. This is fixed by PR #3757 (\"Harden untrusted-model pickle allowlist (exact globals + numpy.lib denylist)\"), merged into develop\n\nAffected: PyPI:nltk\n\nFixed in: 3.10.4\n\nReferences:\nhttps://github.com/nltk/nltk/security/advisories/GHSA-c59x-vh6j-3w8v\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-128136\nhttps://github.com/nltk/nltk/pull/3757\nhttps://github.com/nltk/nltk/commit/a44a7af69bca87e92d9c4a701fcbbe4512e8d450\nhttps://github.com/nltk/nltk\nhttps://github.com/nltk/nltk/releases/tag/v3.10.4","url":"https://osv.dev/vulnerability/GHSA-c59x-vh6j-3w8v","published_at":"2026-11-19T23:58:53Z","updated_at":"2026-11-20T00:15:05.394249Z","fetched_at":"2026-11-21T19:15:55.946107Z","severity":"medium","cvss_score":6.1,"epss":0.00244,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-128136","vuln_ids":["CVE-2026-128136","GHSA-C59X-VH6J-3W8V","GHSA-M396-3H67-VPFV","GHSA-RV69-J573-CM47"],"tags":["osv","pypi","fix-available"],"cluster_id":2130,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10691","html":"https://vulnwatch.ve1ve2.com/item/10691"}},{"id":2349,"source":{"id":"ghsa","name":"GitHub Security Advisories"},"title":"GHSA-c59x-vh6j-3w8v / CVE-2026-128136: NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinks","summary":"NLTK: AllowlistUnpickler does not deny numpy submodule-local file-I/O sinks\n\n### Summary\n\n`nltk.picklesec.allowlisted_pickle_load` keyed its denylist of dangerous globals by export name, so numpy's file-I/O callables that live in submodules and are not re-exported under `__module__ == \"numpy\"` were never matched. Under the broad `allowed_modules=(\"numpy\", \"scipy\", \"sklearn\")` allowance that `TransitionParser.parse(depgraphs, modelFile)` granted for model files, a crafted protocol 4 pickle could name `numpy.lib._npyio_impl.recfromtxt` (arbitrary file read, result returned to the caller of `allowlisted_pickle_load`) or `numpy.lib.format.open_memmap` (attacker-chosen file create), and the REDUCE opcode invoked them during the load.\n\n### Affected\n\nnltk >= 3.10.0 and <= 3.10.3 (the allowlisting unpickler and the `TransitionParser` model path); numpy must be installed.\n\n### Reproduction\n\nA pickle whose REDUCE names `numpy.lib._npyio_impl.recfromtxt` with a target path, loaded through `allowlisted_pickle_load(data, allowed_modules=(\"numpy\",))`, reads that file on v3.10.3; one naming `numpy.lib.format.open_memmap` with mode `w+` creates a file. Both are refused on develop with `UnpicklingError: global '...' is from a denied module`. The maintainer transcript below shows the before and after runs.\n\n### Impact\n\nFile read and file create on the host that loads an untrusted model through NLTK's allowlisting unpickler. No code execution: this sits below the `TransitionParser` code-execution sibling GHSA-m396-3h67-vpfv, which is why the severity was reassessed to Medium (see the reply below).\n\n_Editorial note (2026-10-10): the report body of this advisory had been overwritten with the text of GHSA-rv69-j573-cm47 (the nested gzip decompression bomb). The summary above was reconstructed by the maintainers from the title, the maintainer reply, the CVSS justification and PR #3757; the original reporter text is not recoverable from the record._\n\n---\n\n## Fix status (2026-09-28)\n\nStatus: MERGED on develop (unreleased; v3.10.3 of 2026-08-12 predates the fix).\n\nPR: #3778 \"Bound decompression entry points in nltk (zip/gzip layers + pathsec.ZipFile + weka), CWE-409\", merged 2026-08-25, merge commit 42d99b7a2 on develop. Fix commits: b6e0cedca (the nested gzip layer of a zip .gz member is bounded) and c6fe98211 (the decompression guards stream instead of buffering whole payloads).\n\nProbe: none. The advisory PoC re-run on develop 2fa3f48fe (256 MiB of zeros gzipped into a STORED zip member declared at about 256 KiB, read through nltk.data.find().open().read()): refused with ValueError \"Refusing to decompress suspected gzip bomb 'corpus/bomb.gz': it expands beyond nltk.data.MAX_UNZIP_RATIO=1000\".\n\nRelease: none yet; no release tag contains b6e0cedca.\n\n---\n\n## Maintainer reply (2026-09-28)\n\nStatus: fixed on develop, unreleased.\n\n### Fix verified\n\nThe numpy submodule file I/O sinks named in this report are denied on develop. This is fixed by PR #3757 (\"Harden untrusted-model pickle allowlist (exact globals + numpy.lib denylist)\"), merged into develop\n\nAffected packages: pip:nltk\nPatched: nltk 3.10.4","url":"https://github.com/advisories/GHSA-c59x-vh6j-3w8v","published_at":"2026-11-19T23:58:53Z","updated_at":"2026-11-19T23:58:54Z","fetched_at":"2026-11-21T19:15:18.416769Z","severity":"medium","cvss_score":6.1,"epss":0.00244,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"nltk","vuln_id":"CVE-2026-128136","vuln_ids":["CVE-2026-128136","GHSA-C59X-VH6J-3W8V","GHSA-M396-3H67-VPFV","GHSA-RV69-J573-CM47"],"tags":["ghsa","pip","CWE-502"],"cluster_id":2130,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/2349","html":"https://vulnwatch.ve1ve2.com/item/2349"}},{"id":15181,"source":{"id":"osv","name":"OSV.dev"},"title":"DEBIAN-CVE-2026-128136: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Proc…","summary":"NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.0 until 3.10.4, allowlisted_pickle_load keys dangerous NumPy globals by export name, allowing submodule-local numpy.lib file input/output callables to evade the denylist under the broad module allowance used by TransitionParser. A crafted pickle can invoke recfromtxt to read a local file or open_memmap to create or truncate an attacker-selected file when a victim loads an untrusted model. This issue is fixed in version 3.10.4.\n\nAffected: Debian:14:nltk\n\nNo fixed version published yet\n\nReferences:\nhttps://security-tracker.debian.org/tracker/CVE-2026-128136","url":"https://osv.dev/vulnerability/DEBIAN-CVE-2026-128136","published_at":"2026-11-19T18:18:05.997000Z","updated_at":"2026-11-22T21:00:05.577795Z","fetched_at":"2026-11-23T03:05:53.019743Z","severity":"medium","cvss_score":6.1,"epss":0.00244,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"debian","product":"14:nltk","vuln_id":"CVE-2026-128136","vuln_ids":["CVE-2026-128136","DEBIAN-CVE-2026-128136","GHSA-C59X-VH6J-3W8V","GHSA-M396-3H67-VPFV","GHSA-RV69-J573-CM47"],"tags":["osv","debian","no-fix-yet"],"cluster_id":838,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/15181","html":"https://vulnwatch.ve1ve2.com/item/15181"}},{"id":9029,"source":{"id":"nvd","name":"NVD CVE API 2.0"},"title":"CVE-2026-128136: NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Proc…","summary":"NLTK (Natural Language Toolkit) is a suite of open source Python modules, data sets, and tutorials supporting research and development in Natural Language Processing. From 3.10.0 until 3.10.4, allowlisted_pickle_load keys dangerous NumPy globals by export name, allowing submodule-local numpy.lib file input/output callables to evade the denylist under the broad module allowance used by TransitionParser. A crafted pickle can invoke recfromtxt to read a local file or open_memmap to create or truncate an attacker-selected file when a victim loads an untrusted model. This issue is fixed in version 3.10.4.\n\nReferences:\nhttps://github.com/nltk/nltk/commit/a44a7af69bca87e92d9c4a701fcbbe4512e8d450\nhttps://github.com/nltk/nltk/pull/3757\nhttps://github.com/nltk/nltk/releases/tag/v3.10.4\nhttps://github.com/nltk/nltk/security/advisories/GHSA-c59x-vh6j-3w8v","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-128136","published_at":"2026-11-19T18:18:05.997000Z","updated_at":"2026-11-19T19:17:20.760000Z","fetched_at":"2026-11-21T19:15:31.484684Z","severity":"medium","cvss_score":6.1,"epss":0.00244,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":null,"vuln_id":"CVE-2026-128136","vuln_ids":["CVE-2026-128136","GHSA-C59X-VH6J-3W8V","GHSA-M396-3H67-VPFV","GHSA-RV69-J573-CM47"],"tags":["CWE-502"],"cluster_id":838,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/9029","html":"https://vulnwatch.ve1ve2.com/item/9029"}},{"id":1099,"source":{"id":"redhat","name":"Red Hat Security Data API"},"title":"CVE-2026-128136: nltk: nltk: Unauthorized file access via unsafe deserialization in model loading","summary":"nltk: nltk: Unauthorized file access via unsafe deserialization in model loading","url":"https://access.redhat.com/security/cve/cve-2026-128136","published_at":"2026-11-19T17:50:44Z","updated_at":null,"fetched_at":"2026-11-21T19:15:08.893758Z","severity":"medium","cvss_score":6.1,"epss":0.00244,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"redhat","product":null,"vuln_id":"CVE-2026-128136","vuln_ids":["CVE-2026-128136","GHSA-C59X-VH6J-3W8V","GHSA-M396-3H67-VPFV","GHSA-RV69-J573-CM47"],"tags":["redhat"],"cluster_id":838,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/1099","html":"https://vulnwatch.ve1ve2.com/item/1099"}}]}