Skip to content

← Public intelligence

Maven package

org.apache.opennlp:opennlp-tools

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

4 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Critical, CVSS 9.8MavenPublished

    Apache OpenNLP ExtensionLoader Vulnerable to Arbitrary Class Instantiation via Model Manifest

    CVE-2026-42027 · GHSA-cx4m-2p55-rw7j

    Affected
    • Maven org.apache.opennlp:opennlp-tools >= 3.0.0-M1, < 3.0.0-M3; >= 2.0.0, < 2.5.9; < 1.9.5
    Fixed in
    3.0.0-M32.5.91.9.5· Vendor fix available
    Issue
    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…

    Recommended action: Upgrade to 3.0.0-M3 (pre-release), 2.5.9 or 1.9.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. High, CVSS 7.5MavenAmendedPublished

    Apache OpenNLP AbstractModelReader has an OOM Denial of Service via Unbounded Array Allocation

    CVE-2026-42440 · GHSA-659w-93r5-9j6m

    Affected
    • Maven org.apache.opennlp:opennlp-tools >= 2.0.0, < 2.5.9; >= 3.0.0-M1, < 3.0.0-M3; < 1.9.5
    Fixed in
    3.0.0-M32.5.91.9.5· Vendor fix available
    Issue
    OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader Versions Affected: Before 2.5.9 Before 3.0.0-M3 Description: The AbstractModelReader methods getOutcomes(), getOutcomePatterns(), and getPredicates() each read a 32-bit signed integer count field from a binary model stream and pass that value directly to an array allocation (new String[numOutcomes], new int[numOCTypes][], new String[NUM_PREDS]) without validating that the value is non-negative or within a reasonable bound. The count is therefore fully attacker-controlled when the model file originates from an untrusted source. A crafted .bin model file in which any of these count fields is set to Integer.MAX_VALUE (or any value large enough to exhaust the available heap) triggers an OutOfMemoryError at the array allocation itself, before the corresponding label or pattern data is consumed from the stream. The error occurs very early in deserialization: for a GIS model, getOutcomes() is reached…

    Recommended action: Upgrade to 3.0.0-M3 (pre-release), 2.5.9 or 1.9.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. Critical, CVSS 9.1MavenPublished

    Apache OpenNLP DictionaryEntryPersistor Vulnerable to XML External Entity (XXE) via Unsanitized Dictionary Parsing

    CVE-2026-40682 · GHSA-4v8g-86x5-3vrc

    Affected
    • Maven org.apache.opennlp:opennlp-tools >= 3.0.0-M1, < 3.0.0-M3; >= 2.0.0, < 2.5.9; < 1.9.5
    Fixed in
    3.0.0-M32.5.91.9.5· Vendor fix available
    Issue
    XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP DictionaryEntryPersistor Versions Affected: before 2.5.9, before 3.0.0-M3 Description: The DictionaryEntryPersistor class initializes a static SAXParserFactory at class-load time without enabling FEATURESECUREPROCESSING or disabling DTD processing. When create(InputStream, EntryInserter) is invoked, the only feature set on the XMLReader is namespace support — external entity resolution and DOCTYPE declarations remain fully enabled. An attacker who can supply a crafted dictionary file (e.g., a stop-word list or domain dictionary) containing a malicious DOCTYPE declaration can trigger local file disclosure via file:// entity references or server-side request forgery via http:// entity references during SAX parsing, before the application processes a single dictionary entry. This is inconsistent with the project's own XmlUtil.createSaxParser() helper, which correctly sets FEATURESECUREPROCESSING and…

    Recommended action: Upgrade to 3.0.0-M3 (pre-release), 2.5.9 or 1.9.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Critical, CVSS 9.8MavenPublished

    Improper Restriction of XML External Entity Reference in Apache OpenNLP

    CVE-2017-12620 · GHSA-h22x-hm8g-rxpg

    Affected
    • Maven org.apache.opennlp:opennlp-tools >= 1.5.0, <= 1.8.1
    Fixed in
    1.8.2· Vendor fix available
    Issue
    When loading models or dictionaries that contain XML it is possible to perform an XXE attack, since Apache OpenNLP is a library, this only affects applications that load models or dictionaries from untrusted sources. The versions 1.5.0 to 1.5.3, 1.6.0, 1.7.0 to 1.7.2, 1.8.0 to 1.8.1 of Apache OpenNLP are affected.

    Recommended action: Upgrade to 1.8.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →