Description
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.
Published: 2026-07-06
Score: 7.3 High
EPSS: 8.8% Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

SvmDoccatModel.deserialize uses java.io.ObjectInputStream to read an InputStream without installing an ObjectInputFilter. During deserialization every class referenced in the stream is instantiated before the object is cast to SvmDoccatModel. If an attacker provides a crafted serialization stream that contains a gadget chain present on the running application’s classpath, the chain can execute during deserialization and lead to arbitrary code execution in the JVM. Apache OpenNLP itself contains no known gadget chains, but downstream applications that embed the libsvm module and have vulnerable transitive dependencies are at risk. The exposed public static method therefore allows untrusted code to be executed when a model instance is loaded from foreign sources, compromising confidentiality, integrity, and availability.

Affected Systems

Apache Software Foundation’s Apache OpenNLP Core ML LibSVM is affected for all releases before 3.0.0-M4. The vulnerability exists in the libsvm document categorization module, which is only present on the 3.x line.

Risk and Exploitability

The CVSS score of 7.3 signifies high severity. The EPSS score of 9% indicates a measurable likelihood of exploitation in the wild, and the vulnerability is not listed in CISA’s KEV catalog, suggesting limited observed exploitation. The likely attack vector is inferred as remote, because the method is public and static and can be invoked with an attacker‑controlled stream sent over a network or supplied from a malicious file; this inference is drawn from the description, not directly stated in the advisory. Exploitation requires that the application’s classpath contain a usable deserialization gadget chain; without such a chain the vulnerability would be confined to environments with vulnerable transitive dependencies.

Generated by OpenCVE AI on July 28, 2026 at 09:46 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Apache OpenNLP to version 3.0.0-M4 or later, where the vulnerable deserialization path has been fixed.
  • If an upgrade is not immediately possible, avoid invoking SvmDoccatModel.deserialize() on any streams that originate from untrusted, user‑supplied, or third‑party sources; restrict deserialization to verified inputs only and enforce cryptographic integrity checks such as digital signatures or checksums before deserialization.
  • Implement a Java ObjectInputFilter (or use Java 9+ security features) to restrict the classes that may be instantiated during deserialization, mitigating the CWE‑502 weakness by preventing arbitrary code execution.
  • Remove or isolate the libsvm module from the application classpath when it is not required, thereby eliminating the vulnerable deserialization point altogether.

Generated by OpenCVE AI on July 28, 2026 at 09:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 08 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Apache
Apache opennlp
Vendors & Products Apache
Apache opennlp

Mon, 06 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 06 Jul 2026 16:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Apache OpenNLP :: Core :: ML :: LibSVM: Unsafe Java Deserialization in SvmDoccatModel
Weaknesses CWE-502
References

cve-icon MITRE

Status: PUBLISHED

Assigner: apache

Published:

Updated: 2026-07-06T20:38:00.073Z

Reserved: 2026-05-02T08:57:20.984Z

Link: CVE-2026-43825

cve-icon Vulnrichment

Updated: 2026-07-06T20:38:00.073Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-06T15:42:04Z

Links: CVE-2026-43825 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-28T10:00:12Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data