CVE-2026-91006

Apache Karaf: OS Command Injection in Child-Instance Launch (instance:* / InstancesMBean)

Published Sep 28, 2026 CVSS 3.1 · 8.8 High EPSS 1.1% KEV · Not listed
Description
Apache Karaf's instance-management service (InstanceServiceImpl) builds the command line used to launch a child Karaf JVM by string concatenation, then executes it through /bin/sh (Unix) or cscript (Windows). The caller-supplied javaOpts value is spliced into that string unquoted. A javaOpts value containing shell metacharacters (;, |, `, $(...)) is interpreted by the shell instead of being passed to the JVM as an option, giving arbitrary OS command execution as the Karaf process user.


Reachable via the shell commands instance:create, instance:start, instance:restart, instance:change-opts, and the equivalent InstanceMBean JMX operations (createInstance, startInstance, changeJavaOpts, cloneInstance).

Mitigation  * Set karaf.secured.command.compulsory.roles=admin in etc/system.properties to close the fail-open gap for all unconfigured command scopes.
* Restrict which principals can reach instance:* commands and InstancesMBean via etc/users.properties role assignments.
* Treat javaOpts passed to instance:create/instance:start/instance:change-opts/InstancesMBean as untrusted input only from fully-trusted operators.

Analysis

AI-generated

Technical impact

Apache Karaf's InstanceService implementation constructs a command line to launch child JVMs by concatenating user‑supplied javaOpts into a shell command. Because the value is not quoted, shell metacharacters such as ;, |, `, and $(…) are interpreted by /bin/sh or cscript, allowing an attacker who can invoke instance:create, instance:start, instance:restart, or the corresponding JMX operations to execute arbitrary commands with the credentials of the Karaf process. This is an OS command injection flaw, identified as CWE‑78, and provides full control over the host operating system.

Affected Systems

Both the service‑side and JMX interfaces of Apache Karaf expose this behavior. The vulnerability affects all deployments of Apache Karaf where the InstanceService is reachable, regardless of version, because no specific product version is listed. Administrators who grant users permission to run the instance:* commands or the InstanceMBean methods may inadvertently expose the injection vector.

Risk and Exploitability

Because the flaw relies on command‑line concatenation and unquoted input, exploiting it does not require complex prerequisites; an attacker with access to the Karaf command shell or JMX interface can inject shell metacharacters to run arbitrary commands. The CVSS score is 8.8, indicating a high‑risk vulnerability. The EPSS score is < 1% and KEV is not listed, yet the potential for remote command execution remains significant. Mitigations focus on restricting command access or treating the parameter as untrusted input.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Set karaf.secured.command.compulsory.roles=admin in etc/system.properties to close the fail‑open gap for all unconfigured command scopes.
  • Restrict which principals can reach instance:* commands and InstancesMBean via etc/users.properties role assignments.
  • Treat javaOpts passed to instance:create, instance:start, instance:change-opts, or InstancesMBean as untrusted input only from fully‑trusted operators.

Generated by OpenCVE AI on September 30, 2026 at 05:09 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:apache:karaf:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Apache
Apache karaf
Vendors & Products Apache
Apache karaf
Type Values Removed Values Added
Description Apache Karaf's instance-management service (InstanceServiceImpl) builds the command line used to launch a child Karaf JVM by string concatenation, then executes it through /bin/sh (Unix) or cscript (Windows). The caller-supplied javaOpts value is spliced into that string unquoted. A javaOpts value containing shell metacharacters (;, |, `, $(...)) is interpreted by the shell instead of being passed to the JVM as an option, giving arbitrary OS command execution as the Karaf process user. Reachable via the shell commands instance:create, instance:start, instance:restart, instance:change-opts, and the equivalent InstanceMBean JMX operations (createInstance, startInstance, changeJavaOpts, cloneInstance). Mitigation  * Set karaf.secured.command.compulsory.roles=admin in etc/system.properties to close the fail-open gap for all unconfigured command scopes. * Restrict which principals can reach instance:* commands and InstancesMBean via etc/users.properties role assignments. * Treat javaOpts passed to instance:create/instance:start/instance:change-opts/InstancesMBean as untrusted input only from fully-trusted operators.
Title Apache Karaf: OS Command Injection in Child-Instance Launch (instance:* / InstancesMBean)
Weaknesses CWE-78
References
Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
apache
Published
Updated
Sep 29, 2026, 9:03 PM
Reserved
Sep 14, 2026, 3:56 PM
Status
Analyzed
Published
Sep 28, 2026, 11:16 AM
Modified
Oct 8, 2026, 7:19 PM
Severity
Important
Public date
Sep 28, 2026, 10:44 AM