Apache OpenNLP: Arbitrary Class Instantiation in GeneratorFactory via Feature Descriptor XML
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · Low
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and Red Hat.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Apache | Apache OpenNLP | 3.0.0-M1 to before 3.0.0-M4; before 2.5.11 | 3.0.0-M4, 2.5.11 | Patch available | CNA |
- Apache OpenNLP VendorApache Affected 3.0.0-M1 to before 3.0.0-M4; before 2.5.11 Fixed in 3.0.0-M4, 2.5.11 Patch available CNA
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:apache:opennlp:*:*:*:*:*:*:*:* | before 2.5.11 | Vulnerable | Apache |
| cpe:2.3:a:apache:opennlp:3.0.0:m1:*:*:*:*:*:* | 3.0.0 m1 | Vulnerable | Apache |
| cpe:2.3:a:apache:opennlp:3.0.0:m2:*:*:*:*:*:* | 3.0.0 m2 | Vulnerable | Apache |
| cpe:2.3:a:apache:opennlp:3.0.0:m3:*:*:*:*:*:* | 3.0.0 m3 | Vulnerable | Apache |
- cpe:2.3:a:apache:opennlp:*:*:*:*:*:*:*:* Versions before 2.5.11 Vulnerable ·Apache
- cpe:2.3:a:apache:opennlp:3.0.0:m1:*:*:*:*:*:* Versions 3.0.0 m1 Vulnerable ·Apache
- cpe:2.3:a:apache:opennlp:3.0.0:m2:*:*:*:*:*:* Versions 3.0.0 m2 Vulnerable ·Apache
- cpe:2.3:a:apache:opennlp:3.0.0:m3:*:*:*:*:*:* Versions 3.0.0 m3 Vulnerable ·Apache
Remediation
- Fix · CNA Apache OpenNLP (Apache Software Foundation) Fixed in 3.0.0-M4, 2.5.11
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat JBoss Enterprise Application Platform Expansion Pack | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-63317
- 2026-10-03 Alias added: GHSA-ccq5-x868-5p6x
- 2026-10-16 Affected versions changed · Red Hat
References
More Apache Opennlp vulnerabilities
- TI-2026-31914 Apache OpenNLP :: Core :: ML :: LibSVM: Unsafe Java Deserialization in SvmDoccatModel CVSS 3.1HIGH 7.3
- TI-2026-56958 Apache OpenNLP, Apache OpenNLP: ReDoS / stack exhaustion in RegexNameFinderFactory built-in EMAIL and URL patterns CVSS 4.0CRITICAL 10.0
- TI-2026-30407 Apache OpenNLP: Arbitrary Class Instantiation via Model Manifest in ExtensionLoader CVSS 3.1CRITICAL 9.8
- TI-2026-29367 Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor CVSS 3.1CRITICAL 9.1
- TI-2017-09345 XML external entity injection in Apache OpenNLP CVSS 3.0CRITICAL 9.8
- TI-2026-47528 Apache OpenNLP: OOM DoS via Unbounded Array Allocation in SymSpellModelSerializer CVSS 3.1HIGH 7.5
Sources
- CVE-2026-63317 · CVE Program
- CVE-2026-63317 · NVD
- FIRST EPSS
- GHSA-ccq5-x868-5p6x · GitHub Advisory Database · CC BY 4.0
- CVE-2026-63317 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences