CriticalCVE-2026-42027

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

    Published Last modified Sources: Red Hat, CVE.org, OSV, EUVD

    What is affected, what to do

    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.

    Update Apache OpenNLP to version 2.5.9, Apache OpenNLP to version 3.0.0-M3, Apache OpenNLP to version 1.9.5.

    Affected
    • Apache OpenNLP lt 2.0..2.5.9
    • Apache OpenNLP lt 3.0.0-M1..3.0.0-M3
    • Apache OpenNLP lt *..1.9.5
    Fixed in
    • Apache OpenNLP 2.5.9
    • Apache OpenNLP 3.0.0-M3
    • Apache OpenNLP 1.9.5

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    9.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    9.8

    CVSS v3

    Severity Critical on the scale from 0 to 10.

    Source: Red Hat, CVE.org, OSV, EUVD

    0.7 %

    EPSS score

    Low — model estimates < 1% exploitation likelihood.

    Source: FIRST EPSS, percentile 53.3

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    88.72 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    no public PoC known
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    9.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    9.8
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    0.7 %
    Low — model estimates < 1% exploitation likelihood.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    53.3
    High — this CVE ranks above the median of all CVEs scored today (rank ≥ 36%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    —
    Published
    CISA assessment (SSVC)
    Exploitation: none known · automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 5 May 2026
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-470, CWE-502

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    High technical severity: assess and remediate the vulnerability in vulnerability handling under Art. 21(2)(e) NIS2 and document the decision.
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    From 11.12.2027, Annex I Part II CRA requires manufacturers of affected products with digital elements to handle vulnerabilities without delay and provide security updates.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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.

    Source: redhat_csaf, NVD (NIST), OSV (Open Source Vulnerabilities), cvelistv5, CVE.org (MITRE), ENISA EUVD

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    Apache Software FoundationApache OpenNLP
    • 2.0 – < 2.5.9
    • 3.0.0-M1 – < 3.0.0-M3
    • < 1.9.5
    • 2.5.9
    • 3.0.0-M3
    • 1.9.5
    apacheopennlp
    • 3.0.0
    • < 2.5.9
    • —
    • 2.5.9
    mavenorg.apache.opennlp:opennlp-tools
    • 1.8.4
    • 2.5.1
    • 1.8.1
    • 2.3.1
    • 1.6.0
    • 2.5.5
    • 2.5.6
    • 1.7.1
    • 1.9.2
    • 1.9.4
    • 1.9.0
    • 2.5.8
    • 2.3.0
    • 2.5.2
    • 1.5.2-incubating
    • 2.2.0
    • 1.5.1-incubating
    • 2.0.0
    • 1.5.3
    • 1.7.2
    • 3.0.0-M1
    • 2.3.3
    • 1.7.0
    • 2.5.7
    • 1.8.2
    • 2.5.6.1
    • 2.5.4
    • 1.9.1
    • 1.8.3
    • 2.5.0
    • 1.8.0
    • 2.1.1
    • 3.0.0-M2
    • 1.9.3
    • 2.4.0
    • 2.3.2
    • 2.5.3
    • 2.1.0
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —
    • —

    Vendors and products

    Weakness classes (CWE)

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

      Base

      The product uses external input with reflection to select which classes or code to use, but it does not sufficiently prevent the input from selecting improper classes or code.

      Entry at MITRE CWE-470
    • CWE-502Deserialization of Untrusted Data

      Base

      The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

      Entry at MITRE CWE-502

    References & sources

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. Record modifiedCVE Program

      Show 3 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      http://www.openwall.com/lists/oss-security/2026/05/01/20
      Referenceremoved
      http://www.openwall.com/lists/oss-security/2026/05/01/20
      —
      Reference typeremoved
      http://www.openwall.com/lists/oss-security/2026/05/01/20 Types: Mailing List, Third Party Advisory
      —

      Source identifier: af854a3a-2127-422b-91ae-364da2661108

    2. Record modifiedApache

      Show 3 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://lists.apache.org/thread/ltlo4powjfc0w2w2yyl1o5tc7q1gcb2y
      Referenceremoved
      https://lists.apache.org/thread/ltlo4powjfc0w2w2yyl1o5tc7q1gcb2y
      —
      Reference typeremoved
      https://lists.apache.org/thread/ltlo4powjfc0w2w2yyl1o5tc7q1gcb2y Types: Mailing List, Vendor Advisory
      —

      Source identifier: security@apache.org

    3. Record modifiedRed Hat ADP

      Show 8 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Affected versions (publisher)added
      —
      Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/42xxx/CVE-2026-42027.json">CVE-2026-42027</a>
      Referenceadded
      —
      https://access.redhat.com/errata/RHSA-2026:65126
      Referenceadded
      —
      https://access.redhat.com/security/cve/CVE-2026-42027
      Referenceadded
      —
      https://bugzilla.redhat.com/show_bug.cgi?id=2466527
      Referenceadded
      —
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42027.json
      Referenceremoved
      https://access.redhat.com/security/cve/CVE-2026-42027
      —
      Referenceremoved
      https://bugzilla.redhat.com/show_bug.cgi?id=2466527
      —
      Referenceremoved
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42027.json
      —

      Source identifier: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c

    One NVD translation into another language is hidden.

    Linked advisories

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2026-42027
    <a href="https://intel.neosec.eu/en/cve/CVE-2026-42027"><img src="https://intel.neosec.eu/badge/cve/CVE-2026-42027.svg?lang=en" alt="CVE-2026-42027 – NEOSEC Intel" height="20"></a>