LiveActive security incident?Get immediate response
CVE Record

CVE-2026-42027: Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader

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.

CriticalCVSS 9.8Not KEV-listedUpdated
Glexia's TakeAutomated analysiscritical

Security readout for executives and security teams

Plain-English summary

A malicious OpenNLP model file can make the application initialize unexpected Java classes already present on its classpath. Those classes may perform network, filesystem, or JNDI actions during initialization. Serious impact is possible, but exploitation depends on a suitable side-effecting class being available, so this is not automatic remote code execution.

Executive priority

Prioritize rapid remediation where services load third-party or user-controlled models. Patch other affected deployments promptly because a compromised model supply chain could turn existing classpath components into high-impact behavior. Pair upgrades with model-source governance and a narrow extension allowlist.

Technical view

ExtensionLoader obtains class names from a model archive’s manifest and calls Class.forName() before verifying the class implements the expected interface. Class loading therefore executes static initializers even when the later type check rejects the class. Valid extension subclasses with side-effecting no-argument constructors provide a narrower secondary vector.

Likely exposure

Highest risk applies to applications using affected OpenNLP versions that load model archives from community repositories, external users, or other uncontrolled sources. Exposure and impact depend on the application classpath containing classes with useful initialization side effects. Environments accepting only internally controlled models have lower practical exposure, but remain vulnerable if trust controls fail.

Exploitation context

An attacker must supply or influence a model archive and reference a useful class already present on the target classpath. The supplied sources do not establish active exploitation, and the CVE is not listed as KEV. Absence from KEV does not prove exploitation has never occurred.

Researcher notes

The security boundary failure is ordering: initialization occurs before assignability validation. The fix adds a package-prefix allowlist consulted before Class.forName(); opennlp.* remains allowed by default. Custom factories or serializers outside that namespace require explicit registration or the OPENNLP_EXT_ALLOWED_PACKAGES property. Assess reachable model-loading paths and the complete runtime classpath together.

Mitigation direction

  • Upgrade OpenNLP 2.x to 2.5.9 and 3.x to 3.0.0-M3 or later.
  • Move deployments before 1.9.5 to version 1.9.5 or a later supported release.
  • Until upgraded, accept model archives only from authenticated, trusted origins.
  • Audit the classpath for static initializers or constructors performing JNDI, network, or filesystem operations.
  • Allow custom extension package prefixes only when operationally required and explicitly trusted.

Validation and detection

  • Inventory deployed OpenNLP versions, including resolved org.apache.opennlp:opennlp-tools dependencies.
  • Trace every model archive source and identify paths accepting externally supplied or community models.
  • Inspect model manifests for factory and serializer class references, especially packages outside opennlp.*.
  • Confirm upgraded deployments reject non-allowlisted packages before their classes initialize.
  • Monitor model-loading activity for unexpected JNDI, outbound network, or filesystem behavior.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-470: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · medium confidence lookup

CWE-502: Code execution behavior lookup

Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Execution behavior lookup

The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-42027 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Critical
CVSS
9.8 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
3ADP providers
6Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
9.8CVSS 3.1CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H3.95.9CISA-ADP
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H1.65.9redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

9.8Critical
CVSS 3.1 vector shape for CVE-2026-42027Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CVECVE Program Container
CISA-ADPCISA ADP Vulnrichment
cvssV3_1other:ssvc
redhat-SADPApache OpenNLP: Apache OpenNLP: Arbitrary Class Loading via Model Manifest
other:Red Hat severity ratingcvssV3_1
  • 2026-05-04T19:03:28.394Z: Reported to Red Hat.
  • 2026-05-04T16:43:12.583Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
Apache Software FoundationApache OpenNLPorg.apache.opennlp:opennlp-tools, 2.0, 3.0.0-M1, 0unaffected
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-470 · source CWE mapping

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.

CWE-502 · source CWE mapping

Deserialization of Untrusted Data

Deserialization of Untrusted Data represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.