Bug 1631102 (CVE-2018-11786) - CVE-2018-11786 karaf: SSH RBAC security enforcement
Summary: CVE-2018-11786 karaf: SSH RBAC security enforcement
Alias: CVE-2018-11786
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1654109 1654111 1654112 1654113 1654114
Blocks: 1631103
TreeView+ depends on / blocked
Reported: 2018-09-19 21:35 UTC by Pedro Sampaio
Modified: 2021-10-21 19:53 UTC (History)
22 users (show)

Fixed In Version: Karaf 4.2.0
Doc Type: If docs needed, set a value
Doc Text:
In Karaf prior to version 4.2.0, arbitrary file read and write, in additional to arbitrary command execution, is possible via the Karaf ssh console, if enabled.
Clone Of:
Last Closed: 2021-10-21 19:53:46 UTC

Attachments (Terms of Use)

Description Pedro Sampaio 2018-09-19 21:35:28 UTC
As reported by upstream:

"A new security advisory has been released for Apache Karaf, that is
fixed in recent 4.2.0 release.

CVS-2018-11786: Apache Karaf SSH RBAC security enforcement

Severity: Moderate

Vendor: The Apache Software Foundation

Versions Affected: all versions of Apache Karaf prior to 4.2.0.M1


If the sshd service in Karaf is left on so an administrator can manage
the running instance, any user with rights to the Karaf console can
pivot and read/write any file on the file system to which the Karaf
process user has access. This can be locked down a bit by using chroot
to change the root directory to protect files outside of the Karaf
install directory; it can be further locked down by defining a
security manager policy that limits file system access to those
directories beneath the Karaf home that are necessary for the system
to run. However, this still allows anyone with ssh access to the Karaf
process to read and write a large number of files as the Karaf process

This has been fixed in revision:


Mitigation: Apache Karaf users should upgrade to 4.2.0.M1 or later as
soon as possible.

JIRA Tickets: https://issues.apache.org/jira/browse/KARAF-5427

Credit: This issue was reported by R.A. Porter"

External references:


Comment 1 James Hebden 2018-11-28 02:45:33 UTC
RHOSP 8:  org.apache.karaf-karaf-                                                                      
RHOSP 9:  org.apache.karaf-karaf-                                                                      
RHOSP 10: org.apache.karaf-karaf-                                                                     
RHOSP 12: org.apache.karaf-karaf-    
RHOSP13:  org.apache.karaf-karaf- 
OpenDaylight in RHOSP are shipping vulnerable versions and enabling the functionality required to use this vulnerability to gain code execution in the context of the odl service account.

By default, Open Daylight enables the SSH console on port 8101, with default credentials. As a result, arbitrary code execution is possible with the default login (karaf:karaf). For example:

ssh -v karaf@<odl controller IP> -p 8101
opendaylight-user@root> exec whoami
odl (we are not running as root in the OS context, but the odl service user)

The only constraints applicable to code execution is that the execution does not occur as an administrative user unless Open Daylight has been specifically configured to run under such an account.
Applying the recommended patches developed upstream to limit access based on RBAC mitigates this, full shell access should be granted explicitly or disabled by default.

Comment 2 James Hebden 2018-11-28 02:45:44 UTC

Open Daylight: The SSH console is enabled by default, with default credentials, and allows arbitrary file read and write, in addition to arbitrary command execution, in addition to regular Open Daylight Karaf functions.

Comment 5 Joshua Padman 2019-05-15 22:48:49 UTC
This vulnerability is out of security support scope for the following products:
 * Red Hat JBoss A-MQ 6
 * Red Hat JBoss Fuse 6

Please refer to https://access.redhat.com/support/policy/updates/jboss_notes for more details.

Note You need to log in before you can comment on or make changes to this bug.