CVE-2026-43825
HighCVSS 7.3Exploitation Probability (EPSS)
Very high risk95th percentile - higher than 95% of all known CVEs
Summary
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.
Risk Assessment
The risk is remote code execution in the JVM if a gadget chain is available on the classpath. This primarily affects downstream applications embedding the libsvm module alongside vulnerable transitive dependencies.
Recommendation
Upgrade Apache OpenNLP to version 3.0.0-M4 immediately. If upgrade is not possible, treat all SvmDoccatModel streams as untrusted and avoid calling deserialize() on user-supplied or third-party data without integrity checks.
Other vulnerabilities in Apache OpenNLP
See all- 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.
Original NVD description (English source)
Untrusted Java Deserialization in Apache OpenNLP SvmDoccatModel Versions Affected: before 3.0.0-M4 (libsvm document categorization module; introduced in OPENNLP-1808 and only present on the 3.x line) Description: SvmDoccatModel.deserialize(InputStream) reads an attacker-controlled stream with java.io.ObjectInputStream and calls readObject() without an ObjectInputFilter installed. ObjectInputStream materialises every class referenced in the stream before the resulting object is cast to SvmDoccatModel, so the cast that follows readObject() executes only after the foreign object graph has already been deserialised in full. If a Java deserialization gadget chain is available on the consumer's classpath, a crafted payload supplied to deserialize() executes arbitrary code in the JVM that loads it. Apache OpenNLP itself does not ship a known gadget chain, so the realistic risk is to downstream applications that embed the libsvm module alongside vulnerable transitive dependencies. The method is public and static, so any caller can pass an untrusted stream to it directly. The practical impact is remote code execution against processes that load SvmDoccatModel instances from untrusted or semi-trusted origins. Mitigation: 3.x users should upgrade to 3.0.0-M4. Users who cannot upgrade immediately should treat all serialized SvmDoccatModel streams as untrusted input unless their provenance is verified, and should avoid invoking SvmDoccatModel.deserialize() on streams supplied by end users or fetched from third-party sources without integrity checks.

