CVE-2026-91006: CWE-78 Improper neutralization of special elements used in an OS command ('OS command injection') in Apache Software Foundation Apache Karaf
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.
AI Analysis
Technical Summary
Apache Karaf's instance-management service (InstanceServiceImpl) builds command lines for launching child JVMs by string concatenation and executes them through /bin/sh or cscript. The javaOpts parameter, supplied by the caller, is inserted unquoted into this command string. If javaOpts contains shell metacharacters such as ;, |, `, or $(...), these are interpreted by the shell, resulting in arbitrary OS command execution under the Karaf process user. This vulnerability is exploitable via shell commands instance:create, instance:start, instance:restart, instance:change-opts, and equivalent InstanceMBean JMX operations. The affected versions are all Apache Karaf versions from 0 up to but not including 4.4.12.
Potential Impact
An attacker able to supply crafted javaOpts values to the affected instance-management commands or JMX operations can execute arbitrary OS commands with the privileges of the Karaf process user. This can lead to unauthorized system access, data compromise, or further system compromise depending on the Karaf user's permissions.
Mitigation Recommendations
No official patch or fix is explicitly stated in the provided data. Mitigation involves configuration changes: set karaf.secured.command.compulsory.roles=admin in etc/system.properties to enforce role-based access control, restrict access to instance:* commands and InstancesMBean via role assignments in etc/users.properties, and treat javaOpts input as untrusted unless it comes from fully trusted operators. These mitigations reduce the risk by limiting who can invoke the vulnerable commands and by controlling input trust.
CVE-2026-91006: CWE-78 Improper neutralization of special elements used in an OS command ('OS command injection') in Apache Software Foundation Apache Karaf
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.
Affected software
Apache Software Foundation
Apache Karaf
pkg:maven/org.apache.karaf/apache-karafRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Apache Karaf's instance-management service (InstanceServiceImpl) builds command lines for launching child JVMs by string concatenation and executes them through /bin/sh or cscript. The javaOpts parameter, supplied by the caller, is inserted unquoted into this command string. If javaOpts contains shell metacharacters such as ;, |, `, or $(...), these are interpreted by the shell, resulting in arbitrary OS command execution under the Karaf process user. This vulnerability is exploitable via shell commands instance:create, instance:start, instance:restart, instance:change-opts, and equivalent InstanceMBean JMX operations. The affected versions are all Apache Karaf versions from 0 up to but not including 4.4.12.
Potential Impact
An attacker able to supply crafted javaOpts values to the affected instance-management commands or JMX operations can execute arbitrary OS commands with the privileges of the Karaf process user. This can lead to unauthorized system access, data compromise, or further system compromise depending on the Karaf user's permissions.
Mitigation Recommendations
No official patch or fix is explicitly stated in the provided data. Mitigation involves configuration changes: set karaf.secured.command.compulsory.roles=admin in etc/system.properties to enforce role-based access control, restrict access to instance:* commands and InstancesMBean via role assignments in etc/users.properties, and treat javaOpts input as untrusted unless it comes from fully trusted operators. These mitigations reduce the risk by limiting who can invoke the vulnerable commands and by controlling input trust.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- apache
- Date Reserved
- 2026-09-14T15:56:23.927Z
- State
- PUBLISHED
Threat ID: 6aba4972f7a7c54106911ce6
Added to database: 09/28/2026, 11:03:14 UTC
Last enriched: 09/28/2026, 11:18:07 UTC
Last updated: 09/29/2026, 01:57:23 UTC
Views: 18
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.