Summary
In Apache Karaf up to 4.4.12, when sftpEnabled=true (the default in etc/org.apache.karaf.shell.cfg), the SSH server exposes the karaf.base directory tree via the MINA SSHD SFTP subsystem and SCP. User roles are not checked beyond the initial sshRole login check (CWE-862, missing authorization).
The attack is network-based, low complexity and requires no user interaction. The attacker needs a valid account, but low privileges are enough (e.g. the viewer and ssh roles). The CVSS 3.1 score is 8.8 (High).
Such a user can read sensitive files such as etc/users.properties and etc/host.key. They can also write arbitrary bundles or configurations into monitored directories (deploy/, etc/). This leads to privilege escalation and arbitrary code execution, with full impact on confidentiality, integrity and availability.
Who is affected
Organizations running Apache Karaf 4.4.12 or earlier with SSH access enabled, especially where low-privileged users also hold SSH accounts.
What to do
- Upgrade to Apache Karaf 4.4.13 or 4.5.0. These versions introduce the sftpRole property in org.apache.karaf.shell (default admin) and enforce role-based access control for SFTP, SCP and virtual filesystem access.
- If you cannot upgrade yet and SFTP/SCP is not required: set sftpEnabled=false in etc/org.apache.karaf.shell.cfg. Then restart the SSH server bundle or the whole Karaf instance.
- In etc/org.apache.karaf.shell.cfg, check whether sftpEnabled is on and whether the SSH port is reachable from untrusted networks.
- Review user accounts with the ssh role and remove any that are unnecessary.
- Check the deploy/ and etc/ directories for unexpected files. If compromise is suspected, consider rotating etc/host.key and the credentials in etc/users.properties.
Affected products and versions
CVSS vector, explained
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Privileges required
- Regular user
- User interaction
- Not required
- Scope
- Vulnerable component only
- Confidentiality
- High impact
- Integrity
- High impact
- Availability
- High impact
Weakness type (CWE)
References
- lists.apache.org/thread/h5458p0jjn5o29hbymolrrlhcmkn053d vendor advisory
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Summaries are AI-written under strict rules; always check the vendor's official advisory.