NLTK before 3.10.0 (affected versions <=3.9.4) contains an unsafe pickle deserialization vulnerability in the TransitionParser.parse() method (nltk/parse/transitionparser.py). The method calls pickle_load() with the default restricted=False, routing deserialization through WarningUnpickler, which does not override find_class() and therefore permits arbitrary class resolution. When an application loads an attacker-crafted model file, embedded pickle gadget chains execute arbitrary Python code with the privileges of the user running the application. NLTK provides a RestrictedUnpickler for safe deserialization, but it is not used by production code paths. Fixed in 3.10.0.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/nltk/nltk/security/advisories/GHSA-rhp5-r9x4-f5g2 Exploit, Vendor Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-rhp5-r9x4-f5g2 Exploit, Vendor Advisory
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 9.4 · nltkNVD modified 2026-10-12 17:10
Affected (CPE criteria) 1
cpe:2.3:a:nltk:nltk:*:*:*:*:*:*:*:*
References 3
- https://github.com/nltk/nltk/security/advisories/GHSA-rhp5-r9x4-f5g2 Exploit, Vendor Advisory
- https://www.vulncheck.com/advisories/nltk-before-remote-code-execution-via-unsafe-pickle-deserialization Third Party Advisory
- https://github.com/nltk/nltk/security/advisories/GHSA-rhp5-r9x4-f5g2 Exploit, Vendor Advisory