<Vulnerability name="CVE-2026-43825">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-07-06T15:42:04</PublicDate>
    <Bugzilla id="2497394" url="https://bugzilla.redhat.com/show_bug.cgi?id=2497394" xml:lang="en:us">
org.apache.opennlp/opennlp-tools: Apache OpenNLP SvmDoccatModel: Remote code execution via untrusted Java deserialization
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>7.3</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-502</CWE>
    <Details xml:lang="en:us" source="Mitre">
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.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Apache OpenNLP SvmDoccatModel. This vulnerability allows a remote attacker to achieve arbitrary code execution by supplying a specially crafted payload to the deserialize() method. The method processes untrusted Java deserialization streams without proper validation, enabling the execution of malicious code within the Java Virtual Machine (JVM) that loads it.
    </Details>
    <Statement xml:lang="en:us">
This Moderate flaw in Apache OpenNLP SvmDoccatModel, which allows for remote code execution through untrusted Java deserialization, does not affect Red Hat products. The vulnerable code is not present in Red Hat's supported offerings.
    </Statement>
    <Mitigation xml:lang="en:us">
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
    </Mitigation>
    <PackageState cpe="cpe:/a:redhat:jboss_data_grid:8">
        <ProductName>Red Hat Data Grid 8</ProductName>
        <FixState>Under investigation</FixState>
        <PackageName>opennlp-tools</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:jbosseapxp">
        <ProductName>Red Hat JBoss Enterprise Application Platform Expansion Pack</ProductName>
        <FixState>Under investigation</FixState>
        <PackageName>opennlp-tools</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_ai">
        <ProductName>Red Hat OpenShift AI (RHOAI)</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhoai/odh-trustyai-service-rhel9</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift_ai">
        <ProductName>Red Hat OpenShift AI (RHOAI)</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-43825
https://nvd.nist.gov/vuln/detail/CVE-2026-43825
https://lists.apache.org/thread/c7kom0pgk9cbpfnbooh5m3g85ndf50hn
    </References>
</Vulnerability>