Security Digest · Vulnerability record
CVE-2026-42027: Apache OpenNLP ExtensionLoader Vulnerable to Arbitrary Class Instantiation via Model Manifest
Arbitrary Class Instantiation via Model Manifest in Apache OpenNLP ExtensionLoader Versions Affected: before 1.9.5, before 2.5.9, before 3.0.0-M3 Description: The ExtensionLoader.instantiateExtension(Class, String) method loads a class by its fully-qualified name via Class.forName() and invokes its no-arg…
CVSS 7.5 High EPSS 1.3% · p70
Should you act?
Normal patch cycle
No exploitation signal; fix it in your next routine update if you are affected. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 1.3%, percentile 70: FIRST’s model estimates a 1.3% chance of exploitation activity in the next 30 days, higher than 70% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs a user to click or open something. Phishing makes that realistic, but it is not wormable.
- Only applies if your dependency tree includes
org.apache.opennlp:opennlp-tools(Maven) >= 3.0.0-M1, < 3.0.0-M3, fixed in 3.0.0-M3;org.apache.opennlp:opennlp-tools(Maven) >= 2.0.0, < 2.5.9, fixed in 2.5.9;org.apache.opennlp:opennlp-tools(Maven) < 1.9.5, fixed in 1.9.5. Check your lockfile, including transitive dependencies.
What it is
Arbitrary Class Instantiation via Model Manifest in Apache OpenNLP ExtensionLoader Versions Affected: before 1.9.5, before 2.5.9, before 3.0.0-M3 Description: The ExtensionLoader.instantiateExtension(Class, String) method loads a class by its fully-qualified name via Class.forName() and invokes its no-arg constructor, with the class name sourced from the manifest.properties entry of a model archive. The existing isAssignableFrom check correctly rejects classes that are not subtypes of the expected extension interface (BaseToolFactory for factory=, ArtifactSerializer for serializer-class-), but the check runs after Class.forName() has already loaded and initialized the named class. Class.forName() with default initialization semantics executes the target class's static initializer before returning, so an attacker who can supply a crafted model archive can cause the static initializer of any class on the classpath to run during model loading, regardless of whether that class passes the subsequent type check. Exploitation requires a class with attacker-useful side effects in its static initializer (for example, JNDI lookup, outbound network I/O, or filesystem access) to be present on the classpath, so this is not a drop-in remote code execution; however, the attack surface grows as third-party model distribution becomes more common (community model repositories, Hugging Face-style sharing), where users routinely load model files from origins they do not control. A secondary, narrower vector affects deployments that ship legitimate BaseToolFactory or ArtifactSerializer subclasses with side-effecting no-arg constructors: a malicious manifest can name such a class and force its constructor to run during model load. Mitigation: 2.x users should upgrade to 2.5.9. 3.x users should upgrade to 3.0.0-M3. Note: The fix introduces a package-prefix allowlist that is consulted before Class.forName() is invoked, so the static initializer of a disallowed class is never executed. Classes under the opennlp. prefix remain permitted by default. Deployments that load models referencing factories or serializers outside opennlp. must opt those packages in, either programmatically via ExtensionLoader.registerAllowedPackage(String) before the first model load, or by setting the OPENNLPEXTALLOWEDPACKAGES system property to a…
From the GitHub advisory
Versions Affected: before 1.9.5, before 2.5.9, before 3.0.0-M3
Description:
The ExtensionLoader.instantiateExtension(Class, String) method loads a class by its fully-qualified name via Class.forName() and invokes its no-arg constructor, with the class name sourced from the manifest.properties entry of a model archive. The existing isAssignableFrom check correctly rejects classes that are not subtypes of the expected extension interface (BaseToolFactory for factory=, ArtifactSerializer for serializer-class-), but the check runs after Class.forName() has already loaded and initialized the named class.
Class.forName() with default initialization semantics executes the target class's static initializer before returning, so an attacker who can supply a crafted model archive can cause the static initializer of any class on the classpath to run during model loading, regardless of whether that class passes the subsequent type check.
Exploitation requires a class with attacker-useful side effects in its static initializer (for example, JNDI lookup, outbound network I/O, or filesystem access) to be present on the classpath, so this is not a drop-in remote code execution; however, the attack surface grows as third-party model distribution becomes more common (community model repositories, Hugging Face-style sharing), where users routinely load model files from origins they do not control. A secondary, narrower vector affects deployments that ship legitimate BaseToolFactory or ArtifactSerializer subclasses with side-effecting no-arg constructors: a malicious manifest can name such a class and force its constructor to run during model load.
Weakness type: CWE-470, CWE-502.
Product: org.apache.opennlp:opennlp-tools (Maven) · Assigned by: apache · Published: 2026-05-04
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| Maven | org.apache.opennlp:opennlp-tools | >= 3.0.0-M1, < 3.0.0-M3 | 3.0.0-M3 |
| Maven | org.apache.opennlp:opennlp-tools | >= 2.0.0, < 2.5.9 | 2.5.9 |
| Maven | org.apache.opennlp:opennlp-tools | < 1.9.5 | 1.9.5 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| Apache Software Foundation | Apache OpenNLP | 2.0 < 2.5.9, 3.0.0-M1 < 3.0.0-M3, < 1.9.5 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| CISA-ADP | 3.1 | 9.8 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| redhat-SADP | 3.1 | 7.5 High | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: high (needs special conditions)
- Privileges required: none (no login)
- User interaction: required (a user must click/open something)
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 1.27% probability of exploitation activity in the next 30 days; percentile 70.
Timeline
- — CVE record published by apache
- — GitHub-reviewed advisory GHSA-cx4m-2p55-rw7j published (critical)
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vendor and project advisories, patches
- lists.apache.org lists.apache.org
- access.redhat.com access.redhat.com
Vulnerability records
- GitHub Advisory GHSA-cx4m-2p55-rw7j github.com
- CVE.org record CVE-2026-42027 cve.org
- NVD entry CVE-2026-42027 nvd.nist.gov
Other references from the CVE record and advisory
- openwall.com openwall.com
- access.redhat.com access.redhat.com
- RHBZ#2466527 bugzilla.redhat.com
- security.access.redhat.com security.access.redhat.com