Skip to content
Heist/ feed
Back to feed
HighFix available

apache-opennlp — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-42440

OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader Versions Affected: before 1.9.5 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 after only the model-type string, the correction constant, and the correction parameter have been read; so the attacker pays no meaningful size cost to weaponize a payload, and a single small file can crash a JVM that loads it. Any code path that deserializes a .bin model is affected, including direct use of GenericModelReader and any higher-level component that delegates to it during model load. The practical impact is denial of service against processes that load model files from un

Products
apache-opennlp
Affected versions
2.1.0-1, 2.2.0-1, 2.2.0-1~exp, 2.3.0-1, 2.3.1-1, 2.3.1-2, 2.3.2-1, 2.3.3-1, 2.4.0-1, 2.5.0-1, 2.5.1-1, 2.5.12-1, 2.5.2-1, 2.5.3-1, 2.5.9-1
Fixed versions
2.5.9-1
CVEs
CVE-2026-42440
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:50 UTC · Revision 2

Source evidence

DEBIAN-CVE-2026-42440

core-osv · Original source

Published 4 May 2026, 17:16 UTC

OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader Versions Affected: before 1.9.5 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 after only the model-type string, the correction constant, and the correction parameter have been read; so the attacker pays no meaningful size cost to weaponize a payload, and a single small file can crash a JVM that loads it. Any code path that deserializes a .bin model is affected, including direct use of GenericModelReader and any higher-level component that delegates to it during model load. The practical impact is denial of service against processes that load model files from un

osv:DEBIAN-CVE-2026-42440

apache-opennlp

Fixed versions: Not specified

apache-opennlp

Fixed versions: Not specified

apache-opennlp

Fixed versions: 2.5.9-1

Complete source record
{
  "id": "93d92bb1d433a340a793bf7bf5e7c70d34a7183854e665b2ef4b700f3d4c697d",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-42440",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-42440",
    "summary": "OOM Denial of Service via Unbounded Array Allocation in Apache OpenNLP AbstractModelReader Versions Affected: before 1.9.5 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 after only the model-type string, the correction constant, and the correction parameter have been read; so the attacker pays no meaningful size cost to weaponize a payload, and a single small file can crash a JVM that loads it. Any code path that deserializes a .bin model is affected, including direct use of GenericModelReader and any higher-level component that delegates to it during model load. The practical impact is denial of service against processes that load model files from un",
    "evidence": "osv:DEBIAN-CVE-2026-42440",
    "products": [
      {
        "name": {
          "value": "apache-opennlp",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.1.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.2.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.2.0-1~exp",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.3.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.3.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.3.1-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.3.2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.3.3-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.4.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.1-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.12-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.3-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "2.5.9-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-opennlp",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.5.12-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.5.3-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.5.9-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "apache-opennlp",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "2.5.9-1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "2.5.3-1",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-42440",
      "aliases": [
        "DEBIAN-CVE-2026-42440"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-opennlp",
            "purl": "pkg:deb/debian/apache-opennlp?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "2.1.0-1",
            "2.2.0-1",
            "2.2.0-1~exp",
            "2.3.0-1",
            "2.3.1-1",
            "2.3.1-2",
            "2.3.2-1",
            "2.3.3-1",
            "2.4.0-1",
            "2.5.0-1",
            "2.5.1-1",
            "2.5.12-1",
            "2.5.2-1",
            "2.5.3-1",
            "2.5.9-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-42440.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-opennlp",
            "purl": "pkg:deb/debian/apache-opennlp?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "2.5.12-1",
            "2.5.3-1",
            "2.5.9-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-42440.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "2.5.9-1"
                }
              ]
            }
          ],
          "package": {
            "name": "apache-opennlp",
            "purl": "pkg:deb/debian/apache-opennlp?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "2.5.3-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-42440.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-27T09:47:42.940643221Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-42440"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-42440"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-42440",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 461349,
  "published_at": "2026-05-04T17:16:26.147+00:00"
}