Skip to main content
No exploitation reportedFix available

CVE-2026-63317

Apache OpenNLP: Arbitrary Class Instantiation in GeneratorFactory via Feature Descriptor XML

No exploitation reported by the sources we read.

  • Published2026-07-24
  • Fixed in2.5.11
  • WeaknessCWE-470

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

Arbitrary Class Instantiation via XML Feature Generator Descriptor and Format Name in Apache OpenNLP Versions Affected: - before 2.5.10 - before 3.0.0-M5 Description: Three code paths in Apache OpenNLP load a class by its fully-qualified name via Class.forName() and invoke its no-arg constructor without any prior validation of the class name or its type.  The affected paths are: (1) GeneratorFactory, which reads the class attribute of generator elements in an XML feature generator descriptor; such descriptors are embedded as artifacts in model archives (e.g. TokenNameFinder and POSTagger models) and are parsed during model loading, so an attacker who can supply a crafted model archive controls the class name directly. (2) StreamFactoryRegistry.getFactory(Class, String), which falls back to interpreting an unregistered format name as the fully-qualified class name of an ObjectStreamFactory; this is exploitable in applications that pass untrusted format names (e.g. exposing the -format parameter of the command-line tooling to external input). (3) StringInterners, which instantiates the interner implementation named by the opennlp.interner.class system property; this value is normally deployer-controlled, so it is hardened as defense in depth rather than being independently attacker-reachable. Exploitation requires a class with attacker-useful side effects in its static initializer or no-arg constructor (JNDI lookup, outbound network I/O, filesystem access) to be present on the classpath, so this is not drop-in remote code execution. T Mitigation: Upgrade to a fixed release. The fix routes all three paths through ExtensionLoader.instantiateExtension(...), which consults a package-prefix allowlist before Class.forName() is invoked, so a disallowed class is never loaded, initialized, or constructed. Classes under the opennlp. prefix remain permitted by default. Deployments that load models referencing feature generator factories, object stream factories, or string interners 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 all model files and format names are sourced from trusted origins and should audit their classpath for classes with side-effecting static initializers or constructors.

Timeline

dates in UTC
  1. 2026-07-2409:16CVE publishedNVD

Versions per branch

NVD
Apache opennlp
BranchAffectedFixed in
2.5< 2.5.112.5.11
3.0= 3.0.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Products declared by the CNA1 product

As apache, the CNA that assigned this CVE, declared them in the CVE record; versions as written.

  • Apache Software Foundation Apache OpenNLPother versions: not affected

    package org.apache.opennlp:opennlp-toolshttps://repo.maven.apache.org/maven2/

    Affected
    • ≥ 3.0.0-M1, < 3.0.0-M4fixed in 3.0.0-M4semver
    • < 2.5.11fixed in 2.5.11semver

Source: the CNA record (CVE Program), © The MITRE Corporation,CVE terms of useCVE recordupdated 2026-07-24

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • apache-opennlpUbuntu:26.10all versions · no fixed version listed
  • apache-opennlpUbuntu:26.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:24.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:22.04:LTSall versions · no fixed version listed
  • apache-opennlpUbuntu:20.04:LTSall versions · no fixed version listed
  • apache-opennlpDebian:14all versions · fixed in 2.5.12-1
  • apache-opennlpDebian:13all versions · no fixed version listed
  • apache-opennlpDebian:12all versions · no fixed version listed

3 more package ranges on OSV.dev

Vendor advisories

  • CVE-2026-63317 Red Hat Product Security5 known affected

    org.apache.opennlp/opennlp-tools: Apache OpenNLP: Arbitrary class instantiation via crafted XML or untrusted format names

    lucene-analysis-opennlp as a component of Red Hat JBoss Enterprise Application Platform Expansion Pack · lucene-analyzers-opennlp as a component of Red Hat JBoss Enterprise Application Platform Expansion Pack · opennlp-tools as a component of Red Hat JBoss Enterprise Application Platform Expansion Pack · +2 more

Full record on NVD

Fix

  1. Update Apache opennlp to 2.5.11
  2. Workaround from the vendor Red Hat Product Security CVE-2026-63317 · 5 productsExploitation requires an attacker to supply a crafted OpenNLP model archive (containing a malicious XML feature generator descriptor) or an untrusted format name, so the risk can be reduced by ensuring that all model files and format names are sourced only from trusted origins, by not exposing the …
  3. No fix available, says the vendor Red Hat Product Security CVE-2026-63317 · 5 productsFix deferred

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Published
2026-07-24
Last modified
2026-10-24
NVD status
Analyzed
GitHub advisory
GHSA-ccq5-x868-5p6x

Frequently asked questions

What is CVE-2026-63317?

Arbitrary Class Instantiation via XML Feature Generator Descriptor and Format Name in Apache OpenNLP Versions Affected: - before 2.5.10 - before 3.0.0-M5 Description: Three code paths in Apache OpenNLP load a class by its fully-qualified name via Class.forName() and invoke its no-arg constructor without any prior validation of the class name or its type.  The affected paths are: (1) GeneratorFactory, which reads the class attribute of generator elements in an XML feature generator descriptor; such descriptors are embedded as artifacts in model archives (e.g. TokenNameFinder and POSTagger models) and are parsed during model loading, so an attacker who can supply a crafted model archive controls the class name directly. (2) StreamFactoryRegistry.getFactory(Class, String), which falls back to interpreting an unregistered format name as the fully-qualified class name of an ObjectStreamFactory; this is exploitable in applications that pass untrusted format names (e.g. exposing the -format parameter of the command-line tooling to external input). (3) StringInterners, which instantiates the interner implementation named by the opennlp.interner.class system property; this value is normally deployer-controlled, so it is hardened as defense in depth rather than being independently attacker-reachable. Exploitation requires a class with attacker-useful side effects in its static initializer or no-arg constructor (JNDI lookup, outbound network I/O, filesystem access) to be present on the classpath, so this is not drop-in remote code execution. T Mitigation: Upgrade to a fixed release. The fix routes all three paths through ExtensionLoader.instantiateExtension(...), which consults a package-prefix allowlist before Class.forName() is invoked, so a disallowed class is never loaded, initialized, or constructed. Classes under the opennlp. prefix remain permitted by default. Deployments that load models referencing feature generator factories, object stream factories, or string interners 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 all model files and format names are sourced from trusted origins and should audit their classpath for classes with side-effecting static initializers or constructors.

Is CVE-2026-63317 actively exploited?

Active exploitation of CVE-2026-63317 has not been confirmed. Its EPSS score was 0.5% on 2026-12-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2026-63317?

CVE-2026-63317 has a CVSS v3 base score of 5.6 (Medium severity), with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L.

Running opennlp-tools? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website checks · 250 API requests/month

Sources for this record