Apache OpenNLP vulnerabilities
5 known CVE vulnerabilities in Apache OpenNLP, translated and rated.
- CVE-2026-43825High
In Apache OpenNLP, the libsvm document categorization module (3.x line) is vulnerable to untrusted Java deserialization. The SvmDoccatModel.deserialize(InputStream) method uses java.io.ObjectInputStream without a filter, allowing an attacker to execute arbitrary code via a crafted stream.
- CVE-2026-42027Critical
In Apache OpenNLP before versions 1.9.5, 2.5.9, and 3.0.0-M3, the ExtensionLoader.instantiateExtension() method loads a class by name from a model archive's manifest.properties using Class.forName() before checking type compatibility. This allows an attacker to execute the static initializer of any class on the classpath during model loading, potentially causing harmful side effects.
- CVE-2026-40682Critical
An XML External Entity (XXE) vulnerability was found in Apache OpenNLP's DictionaryEntryPersistor class. The class initializes a SAX parser without enabling secure processing or disabling DTD handling, allowing an attacker to inject a malicious DOCTYPE declaration in a dictionary file. This can lead to local file disclosure via file:// entity references or server-side request forgery via http:// entity references during XML parsing.
- CVE-2026-63317Medium
In Apache OpenNLP before versions 2.5.10 and 3.0.0-M5, a vulnerability allows arbitrary class instantiation. An attacker can supply a crafted model or format name, leading to loading and executing code from dangerous classes.
- CVE-2026-42440High
In Apache OpenNLP before versions 1.9.5, 2.5.9, and 3.0.0-M3, a denial-of-service vulnerability exists due to unbounded array allocation in AbstractModelReader. The methods getOutcomes(), getOutcomePatterns(), and getPredicates() allocate arrays based on a 32-bit integer from the model file without validation, allowing an attacker to set the value to Integer.MAX_VALUE and trigger an OutOfMemoryError.

