nltk is vulnerable to Remote Code Execution (RCE)
93
Critical Risk
TransitionParser.parse loads model files through pickle_load with the default restricted=False, which routes deserialization through WarningUnpickler and does not restrict class resolution. An attacker who can supply a crafted model path therefore executes arbitrary Python during unpickling. NLTK already ships a safe unpickler path, but production call sites did not use it. The fix loads models through an allowlisted unpickler so gadget payloads are refused.
You are affected if you are using a version that falls within the vulnerable range and your application loads TransitionParser models from paths an attacker can influence.
nltk is vulnerable to Remote Code Execution (RCE) in versions 3.0.2 - 3.9.4.
Upgrade the nltk library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant