CVE-2026-12252: Untrusted JAR Code Execution in Multiple Stanford Interface Classes in nltk/nltk
In nltk/nltk versions 3.9.3 and earlier, five Stanford interface classes (StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser) are vulnerable to untrusted JAR code execution. These classes accept user-controllable JAR paths and execute them via the java() function, which invokes subprocess.Popen() without integrity verification. This vulnerability is identical to CVE-2026-0848, which was fixed for StanfordSegmenter by adding SHA256 verification. However, the fix was not applied to these additional classes, leaving them susceptible to arbitrary code execution when loading untrusted JAR files.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-12252?
The severity of CVE-2026-12252 is high with a CVSS score of 7.8.
How do I fix CVE-2026-12252?
To fix CVE-2026-12252, upgrade to nltk/nltk version 3.9.4 or later.
What impact does CVE-2026-12252 have on my system?
CVE-2026-12252 can allow untrusted JAR code execution, potentially compromising system security.
Which versions of nltk/nltk are affected by CVE-2026-12252?
CVE-2026-12252 affects nltk/nltk versions 3.9.3 and earlier.
What are the vulnerable classes associated with CVE-2026-12252?
The vulnerable classes in CVE-2026-12252 are StanfordPOSTagger, StanfordNERTagger, StanfordParser, StanfordDependencyParser, and StanfordNeuralDependencyParser.