org.apache.opennlp:opennlp-api@3.0.0-M1

  • latest version

    3.0.0-M3

  • latest non vulnerable version

  • first published

    2 months ago

  • latest version published

    19 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.apache.opennlp:opennlp-api package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Unsafe Reflection

    Affected versions of this package are vulnerable to Unsafe Reflection that leads to arbitrary class instantiation, via the instantiateExtension() method in the ExtensionLoader class. An attacker can trigger the static initializer of any class present on the classpath by supplying a model archive with a malicious manifest, leading to the execution of unintended code with potential side effects such as JNDI lookups, outbound network requests, or filesystem access. The isAssignableFrom() check that is intended to block the loading of classes from outside the extension's namespace succeeds, but runs after the class has already been loaded and initialized.

    This is only exploitable if a class with attacker-controlled side effects in its static initializer or no-argument constructor is present on the classpath, and the attacker is able to supply a model archive from an untrusted source, such as a shared Hugging Face model.

    Note: The fix for this vulnerability involves an allowlist approach, a consequence of which is that classes under the opennlp.* prefix are permitted by default. Other classes must be explicitly allowed via registerAllowedPackage() or configured with OPENNLP_EXT_ALLOWED_PACKAGES

    How to fix Unsafe Reflection?

    Upgrade org.apache.opennlp:opennlp-api to version 3.0.0-M3 or higher.

    [3.0.0-M1,3.0.0-M3)