CVE-2026-42027: Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader
CVE-2026-42027 key facts
- CISA KEV
- Not listed (catalogue checked )
- Highest advisory rating
- Critical
- CVSS base score
- 9.8 (Apache), 7.5 (Red Hat)
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H· base score 9.8, scored by CISA-ADPAttack vector: network. Attack complexity: low. Privileges required: none. User interaction: none. Scope: unchanged. Confidentiality impact: high. Integrity impact: high. Availability impact: high.- Weakness
- CWE-470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
- EPSS
- 0.72% chance of exploitation in the next 30 days (55th percentile). FIRST EPSS, .
- CISA SSVC
- Exploitation: none observed. Automatable: yes. Technical impact: total. CISA, .
- Fixed releases
- Apache: 2.5.9, 3.0.0-M3, 1.9.5
- Assigned by
- apache (CNA)
- CVE record published
- Listed by VulniPulse
- Record changed
Ratings, versions and fixes are quoted from the vendor advisories that cover only CVE-2026-42027; each belongs to its advisory, not to every product listed. How records are collected and checked.
Am I affected by CVE-2026-42027?
You are affected if you run Apache OpenNLP ExtensionLoader at one of the versions below. If you do, upgrade to the fixed release listed for your version.
| Affected | Fixed in |
|---|---|
| Apache: Apache OpenNLP 2.0 before 2.5.9 | 2.5.9 |
| Apache: Apache OpenNLP 3.0.0-M1 before 3.0.0-M3 | 3.0.0-M3 |
| Apache: Apache OpenNLP before 1.9.5 | 1.9.5 |
Description
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.
Text from the CVE.org record (apache).
How do I fix CVE-2026-42027?
Upgrade to a fixed release named by the vendor:
- Apache: 2.5.9, 3.0.0-M3, 1.9.5
- Mitigation: * 2.x users should upgrade to 2.5.9. * 3.x users should upgrade to 3.0.0-M3. (Apache)
- 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. (Apache)
- Red Hat rates this important; a fix erratum may not be out yet — apply the RHSA as soon as it publishes. (Red Hat)
Vendor advisories for CVE-2026-42027
Apache
1 advisory- Advisory severityCritical9.8
Critical [CVE-2026-42027] Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader
CVE-2026-42027Source published Source updated
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 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…
- Affected products in this advisory
- Apache OpenNLP ExtensionLoader
- Source-reported affected versions
- Apache OpenNLP 2.0 before 2.5.9
- Apache OpenNLP 3.0.0-M1 before 3.0.0-M3
- Apache OpenNLP before 1.9.5
- Source-reported fixed versions
- 2.5.9
- 3.0.0-M3
- 1.9.5
- Mitigation guidance
- Mitigation: * 2.x users should upgrade to 2.5.9. * 3.x users should upgrade to 3.0.0-M3.
- 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.
Red Hat
1 advisory- Advisory severityHigh7.5
High [CVE-2026-42027] Arbitrary Class Loading via Model Manifest
CVE-2026-42027Source published
Arbitrary Class Loading via Model Manifest. Red Hat rates this important (CVSS 7.5). Weakness: CWE-502. No fix erratum has been published yet; monitor the Red Hat CVE page and apply the RHSA when released.
- Affected products in this advisory
- Red Hat Fuse 7
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 2.25
- Source-reported affected versions
- Affected-version details not available in this record.
- Source-reported fixed versions
- No fixed-version detail extracted. This does not mean no fix exists.
- Mitigation guidance
- Red Hat rates this important; a fix erratum may not be out yet — apply the RHSA as soon as it publishes.
References
- CVE-2026-42027 recordCVE.org
- CVE-2026-42027 detailNVD
- lists.apache.org/thread/ltlo4powjfc0w2w2yyl1o5tc7q1gcb2yvendor-advisory
Timeline
- First vendor advisory listed by VulniPulse
- CVE record published
- CVE record last updated
More Apache advisories
CVE-2026-137442Dec 3, 2026Apache OFBiz: Direct Request in Order Confirmation EmailCVE-2026-136829Dec 3, 2026Apache OFBiz: Use of Non-Canonical URL Paths in Password-Reset SessionsCVE-2026-136828Dec 3, 2026Apache OFBiz: Authorization Bypass Through User-Controlled Key in Work Effort AssociationsCVE-2026-136827Dec 3, 2026Apache OFBiz: Direct Request in Manufacturing Production Run ServicesCVE-2026-136826Dec 3, 2026Apache OFBiz: Direct Request in Order Requirement ServicesCVE-2026-136820Dec 3, 2026Apache OFBiz: Direct Request in Customer Request Services
Get an email when Apache publishes the next one.
See Apache's last 90 days first. Live alerts for one product are free for life; every vendor is US$10 a month with Pro (first month US$5).