PT-2026-64261 · Apache · Opennlp
CVSS v3.1
5.6
Medium
| Vector | AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L |
Name of the Vulnerable Software and Affected Versions
Apache OpenNLP versions prior to 2.5.10
Apache OpenNLP versions prior to 3.0.0-M5
Description
Three code paths allow arbitrary class instantiation by loading a class via its fully-qualified name using
Class.forName() and invoking its no-arg constructor without prior validation. The affected paths include GeneratorFactory, which processes the class attribute of generator elements in XML feature generator descriptors embedded in model archives; StreamFactoryRegistry.getFactory(Class, String), which may interpret an unregistered format name as a class name for an ObjectStreamFactory; and StringInterners, which uses the opennlp.interner.class system property. Exploitation requires a class with side effects in its static initializer or no-arg constructor to be present on the classpath.Recommendations
Upgrade to version 2.5.10 or later.
Upgrade to version 3.0.0-M5 or later.
For deployments requiring factories or interners outside the
opennlp.* prefix, use ExtensionLoader.registerAllowedPackage(String) or set the OPENNLP EXT ALLOWED PACKAGES system property to a comma-separated list of allowed package prefixes.
Ensure all model files and format names are sourced from trusted origins.
Audit the classpath for classes with side-effecting static initializers or constructors.Exploit
Fix
RCE
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Opennlp