# CVE-2026-43825: Apache OpenNLP :: Core :: ML :: LibSVM: Unsafe Java Deserialization in SvmDoccatModel

> Attackers can execute arbitrary code by supplying malicious serialized data to the SvmDoccatModel deserialization method in Apache OpenNLP.

- **Severity:** High 7.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 6 Jul 2026
- **Updated:** 6 Jul 2026
- **Also known as:** GHSA-g4fv-7mf3-543r, UBUNTU-CVE-2026-43825

## What is CVE-2026-43825?

CVE-2026-43825 is a high-severity unsafe deserialization vulnerability in Apache OpenNLP :: Core :: ML :: LibSVM, published on 6 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2026-43825?

It affects 1 product.


Products: Apache Opennlp.

## How do I fix CVE-2026-43825?

No fix has been published for CVE-2026-43825 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-43825 being exploited?

There is no known exploitation of CVE-2026-43825 in the wild and no public exploit code.

## Other vulnerabilities in Apache OpenNLP :: Core :: ML :: LibSVM

- [CVE-2026-82617](https://insights.sbomify.com/CVE-2026-82617/): Apache OpenNLP, Apache OpenNLP: ReDoS / stack exhaustion in RegexNameFinderFactory built-in EMAIL and URL patterns (critical 10.0)
- [CVE-2026-42027](https://insights.sbomify.com/CVE-2026-42027/): Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader (critical 9.8)
- [CVE-2017-12620](https://insights.sbomify.com/CVE-2017-12620/): Improper Restriction of XML External Entity Reference in Apache OpenNLP (critical 9.8)
- [CVE-2026-40682](https://insights.sbomify.com/CVE-2026-40682/): Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor (critical 9.1)
- [CVE-2026-67211](https://insights.sbomify.com/CVE-2026-67211/): Apache OpenNLP: OOM DoS via Unbounded Array Allocation in SymSpellModelSerializer (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-43825 and fix it if it is affected.

What it is: CVE-2026-43825 is a high-severity unsafe deserialization vulnerability in Apache OpenNLP :: Core :: ML :: LibSVM, published on 6 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-43825 in the wild and no public exploit code.

Affected product: Apache OpenNLP :: Core :: ML :: LibSVM. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-43825/ (Markdown: https://insights.sbomify.com/CVE-2026-43825/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-43825
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-43825
- OSV: https://osv.dev/vulnerability/CVE-2026-43825

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-43825/
Summaries are generated and may contain mistakes; the official description above is the record.
