Skip to content
CriticalVulnerability

CVE-2026-42027: Apache OpenNLP ExtensionLoader class instantiation via model manifest

Identifier
CVE-2026-42027
Published
Record updated
View JSON
Fixed in
The source references a patch, a mitigation or a vendor advisory.

Summary

Apache OpenNLP's ExtensionLoader.instantiateExtension(Class, String) loads a class named in a model archive's manifest.properties via Class.forName() before its isAssignableFrom type check runs, so the target's static initializer executes even for rejected classes. Affected versions are before 1.9.5, before 2.5.9 and before 3.0.0-M3. Exploitation needs a side-effecting class already on the classpath, and a malicious manifest can also force side-effecting BaseToolFactory or ArtifactSerializer constructors to run during model load.

Mitigation

2.x users should upgrade to 2.5.9. 3.x users should upgrade to 3.0.0-M3. Users who cannot upgrade immediately should ensure all model files are sourced from trusted origins and audit their classpath for classes with side-effecting static initializers or constructors, particularly those performing JNDI lookups, network requests, or filesystem operations during class initialization.