org.apache.karaf.instance:org.apache.karaf.instance.core@4.4.6

  • latest version

    4.4.12

  • latest non vulnerable version

  • first published

    13 years ago

  • latest version published

    1 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.apache.karaf.instance:org.apache.karaf.instance.core 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
    Command Injection

    Affected versions of this package are vulnerable to Command Injection via InstanceServiceImpl in the instance-management service, where doStart and the self-restart path of restartInstance concatenate unquoted javaOpts into a command executed by a shell. An attacker can execute arbitrary OS commands as the Karaf process user by supplying shell metacharacters in javaOpts through the instance:* commands or corresponding JMX operations.

    Notes

    • The command-entry path requires an authenticated shell user, but before the fix the instance command scope had no ACL, so any authenticated user could invoke instance:* regardless of role.

    Workarounds

    • Set karaf.secured.command.compulsory.roles=admin in etc/system.properties to require admin authorization for command scopes without configured role requirements, reducing access to the vulnerable instance operations.
    • Restrict role assignments in etc/users.properties so only authorized principals can access instance:* commands and InstancesMBean, limiting who can supply javaOpts to the vulnerable operations.
    • Accept javaOpts for instance:create, instance:start, instance:change-opts, and InstancesMBean operations only from fully trusted operators, reducing the chance that untrusted shell metacharacters reach the vulnerable launch path.

    How to fix Command Injection?

    Upgrade org.apache.karaf.instance:org.apache.karaf.instance.core to version 4.4.12 or higher.

    [,4.4.12)