CVE-2026-124615: Apache Karaf: feature:requirement-add / feature:requirement-remove command ACL bypass allows a viewer to install and run arbitrary code
The shell command ACL for the feature scope (etc/org.apache.karaf.command.acl.feature.cfg) restricts feature:install, feature:uninstall, feature:start and feature:stop to the admin role, but had no entry for feature:requirement-add or feature:requirement-remove.
The provisioning resolver turns a requirement into the same install/start (or uninstall) action as feature:install / feature:uninstall: a bundle: requirement causes an arbitrary bundle to be downloaded and started, and a feature: requirement installs that feature. Because the two commands had no ACL, a user authenticated with only the viewer (and ssh) role could invoke them and cause Apache Karaf to download, install and start an attacker-chosen bundle, which then runs with the full authority of the Karaf process — thereby bypassing the admin-only authorization enforced on feature:install and bundle:install.
This is the same class of issue as the feature:repo-add -i / feature:repo-remove -u bypass, on sibling commands not covered by that earlier fix.Mitigation:Upgrade to Apache Karaf 4.4.12 or 4.5.0 (or later), which restrict feature:requirement-add and feature:requirement-remove to the admin role.
As an interim workaround on affected versions, add the following two lines to etc/org.apache.karaf.command.acl.feature.cfg; the change is picked up at runtime without a restart:
requirement-add = admin
requirement-remove = admin
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.4.12 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.5.0 - Configuration
Add `requirement-add = admin` and `requirement-remove = admin` to `etc/org.apache.karaf.command.acl.feature.cfg`; the changes take effect at runtime without a restart.
Apache Karaf requirement-add and requirement-remove = admin
Event History
Frequently Asked Questions
Which users can exploit this issue?
Any authenticated user that has both the viewer and ssh roles can invoke the uncovered commands. They do not need the admin role.
What access and attacker-controlled input are required?
The attacker needs shell access and must be able to run feature:requirement-add or feature:requirement-remove. A bundle: requirement can cause an attacker-chosen bundle to be downloaded and started, while a feature: requirement can install the specified feature.
What is the impact after successful exploitation?
An attacker can cause arbitrary bundle code to run with the full authority of the Karaf process. This bypasses the admin-only restrictions applied to feature:install and bundle:install.
Are default command ACLs affected?
Yes. The affected feature command ACL configuration lacked entries for feature:requirement-add and feature:requirement-remove, even though related install, uninstall, start, and stop commands were restricted to the admin role.
What should be done if an immediate upgrade is not possible?
Restrict feature:requirement-add and feature:requirement-remove to the admin role in etc/org.apache.karaf.command.acl.feature.cfg. Upgrade to Apache Karaf 4.4.12, 4.5.0, or later when possible.