Critical [CVE-2026-42027] Apache OpenNLP ExtensionLoader: Arbitrary Class Instantiation
This critical-severity Apache Software Foundation advisory covers CVE-2026-42027 affecting Apache OpenNLP ExtensionLoader.
Android app · Google Play
Monitor future Apache Software Foundation CVEs from your phone.
Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.
Summary
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
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.
- 1.9.5
- 2.5.9
- 3.0.0
Official advisory · high-confidence parse· fetched 1 month ago·verify at source
- 1.9.5
- 2.5.9
- 3.0.0-M3
Official advisory · high-confidence parse· fetched 1 month ago·verify at source
Mitigation
Upgrade to a fixed release: 1.9.5, 2.5.9, 3.0.0-M3. That is the remediation for this advisory.
The vendor advisory may list additional interim mitigations or workarounds not captured here — review it before change work.
Official advisory · high-confidence parse· fetched 1 month ago·verify at source
Discussion(0)
No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.
Sign in to join the discussion.