cve.bz

CVE-2026-42027 apache opennlp: Reflection Injection

9.8 criticalEPSS 0.7%Fix available

Critical (9.8) in apache opennlp. EPSS 0.7% estimated probability of exploitation activity in the next 30 days. Fixed in org.apache.opennlp:opennlp-tools 1.9.5, 2.5.9, 3.0.0-M3.

On this page
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 OPENNLP_EXT_ALLOWED_PACKAGES system property to a comma-separated list of allowed package prefixes. Users who cannot upgrade immediately should ensure that all model files are sourced from trusted origins and should audit their classpath for classes with side-effecting static initializers or constructors, particularly any that perform JNDI lookups, network requests, or filesystem operations during class initialization.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 1.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 54th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: total, assessed 2026-05-05. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-470 Use of Externally-Controlled Input to Select Classes or Code (Reflection Injection)
CWE-502 Deserialization of Untrusted Data
OWASP Top 10
A05:2025 Injection, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-42027 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-42027?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-42027?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-42027 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-42027

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-42027](https://cve.bz/cve/badge/CVE-2026-42027.svg)](https://cve.bz/cve/CVE-2026-42027)

HTML:

<a href="https://cve.bz/cve/CVE-2026-42027"><img src="https://cve.bz/cve/badge/CVE-2026-42027.svg" alt="CVE-2026-42027"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Apache Software Foundation Apache OpenNLPfrom 2.0 before 2.5.9
Apache Software Foundation Apache OpenNLPfrom 3.0.0-M1 before 3.0.0-M3
Apache Software Foundation Apache OpenNLPbefore 1.9.5

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-cx4m-2p55-rw7jMavenorg.apache.opennlp:opennlp-tools>=2.0.0 <2.5.92.5.9
GHSA-cx4m-2p55-rw7jMavenorg.apache.opennlp:opennlp-tools>=3.0.0-M1 <3.0.0-M33.0.0-M3
GHSA-cx4m-2p55-rw7jMavenorg.apache.opennlp:opennlp-tools<1.9.51.9.5

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13apache-opennlpno fix listedDEBIAN-CVE-2026-42027
Debian14apache-opennlp2.5.9-1DEBIAN-CVE-2026-42027
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 3 moreapache-opennlpno fix listedUBUNTU-CVE-2026-42027
openSUSETumbleweedopennlp1.9.5-1.1openSUSE-SU-2026:11281-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Important.

ProductPackageStateAdvisory
Red Hat OpenShift AI 2.25rhoai/odh-trustyai-service-rhel9:1788198681Fixed 2026-09-08RHSA-2026:65126
Red Hat build of Apache Camel for Spring Boot 4opennlp-toolsNot affected
Red Hat Data Grid 8opennlp-toolsNot affected
Red Hat Fuse 7opennlp-toolsWill not fix
Red Hat JBoss Enterprise Application Platform 8opennlp-toolsNot affected
Red Hat JBoss Enterprise Application Platform Expansion Packopennlp-toolsNot affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-trustyai-service-rhel8Not affected
Red Hat OpenShift AI (RHOAI)rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9Will not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-42027.

Attack patterns (CAPEC)

  • CAPEC-138 Reflection Injection Severity: Very High
  • CAPEC-586 Object Injection Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON