Gptline: NLTK: Allowlisted pickle loaders still permit code execution in current source (CVE-2026-79657)
Description
CVE-2026-79657 is a critical remote code execution vulnerability in the Natural Language Toolkit (NLTK) library's allowlisted pickle loaders. The vulnerability arises because the allowlist trusts entire module namespaces rather than specific safe globals, allowing crafted pickle payloads to invoke dangerous callables during deserialization. This affects functions such as nltk.picklesec.allowlisted_pickle_load, nltk.tokenize.punkt.punkt_pickle_load, and nltk.parse.transitionparser.TransitionParser.parse in versions before 3.10.3. The flaw permits attackers to execute arbitrary commands when loading attacker-controlled tokenizer or model artifacts, defeating the intended safety mechanism. A patch is available that tightens the allowlist to exact (module, qualname) pairs and denies dangerous modules, effectively blocking these exploits.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability CVE-2026-79657 involves unsafe deserialization in NLTK's allowlisted pickle loaders, which currently allow arbitrary code execution by trusting broad module namespaces instead of specific safe globals. This enables attackers to craft pickle payloads that exploit dangerous callables such as nltk.tokenize.repp.ReppTokenizer._execute and numpy.f2py.crackfortran.myeval during unpickling. The affected functions include nltk.picklesec.allowlisted_pickle_load, nltk.tokenize.punkt.punkt_pickle_load, and nltk.parse.transitionparser.TransitionParser.parse, with affected versions including the current source v3.10.0-rc2 and versions prior to 3.10.3. The root cause is the overly broad allowlist that includes entire namespaces like nltk.tokenize and numpy, exposing unsafe callables. The vulnerability allows remote code execution when loading attacker-controlled model or tokenizer artifacts. The patch replaces broad module-prefix allowlists with exact (module, qualname) pairs, denies dangerous modules such as os, subprocess, builtins, and numpy.f2py, and enforces strict checks in find_class to block dotted names and dangerous modules. This fix effectively blocks the demonstrated exploits while allowing legitimate loads to function.
Potential Impact
This vulnerability allows remote attackers to execute arbitrary code during the deserialization of pickle objects via NLTK's allowlisted pickle loaders. Any application that loads attacker-controlled tokenizer or model artifacts using these loaders is at risk. The vulnerability defeats the intended safety mechanism of allowlisted deserialization, creating a false sense of security and enabling command execution through dangerous callables within trusted namespaces. This can lead to full system compromise or unauthorized actions within the affected environment.
Mitigation Recommendations
A patch is available that tightens the allowlist to exact (module, qualname) pairs instead of broad module namespaces. The patch also denies dangerous modules such as os, subprocess, builtins, and numpy.f2py even if they appear in allowed modules, providing a defense-in-depth backstop. Users should upgrade to version 3.10.3 or later where these fixes are implemented. Until patched, avoid loading untrusted pickle data with the affected NLTK loaders. The vendor advisory confirms the patch and recommends replacing broad allowlists with precise safe globals and modules.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-vp9c-2pjm-8925
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-79657"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 3.1
Threat ID: 6a8d9abeacd9273b493e0c88
Added to database: 08/25/2026, 13:38:06 UTC
Last enriched: 09/18/2026, 02:16:35 UTC
Last updated: 10/10/2026, 06:48:19 UTC
Views: 51
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.