< go back to overview

Command injection when using external SMB storage

Platform: ownCloud Server

Versions: 6.0.8, 7.0.6, 8.0.4,

Date: 6/24/2015

Risk level: High

CVSS v2 Base Score: 9 (AV:N/AC:L/Au:S/C:C/I:C/A:C)

CWE: Improper Neutralization of Special Elements used in an OS Command (‘OS Command Injection’) (CWE-78)

Description

The external SMB storage of ownCloud was not properly neutralizing all special elements which allows an adversary to execute arbitrary SMB commands.

This was caused by improperly sanitizing the ; character which is interpreted as command separator by smbclient (the used software to connect to SMB shared by ownCloud)

Effectively this allows an attacker to gain access to any file on the system or overwrite it, finally leading to a PHP code execution in the case of ownCloud’s config file.

Affected Software

  • ownCloud Server < 6.0.8 (CVE-2015-4718)
  • ownCloud Server < 7.0.6 (CVE-2015-4718)
  • ownCloud Server < 8.0.4 (CVE-2015-4718)

Action Taken

Files containing a ; are no longer processed on external SMB storages. This is no regression as handling files containing said character was not reliably possible before as well.

ownCloud 8.1 will feature a completely rewritten SMB storage with cleaner code to reduce the attack surface even more.

Acknowledgements

The ownCloud team thanks the following people for their research and responsible disclosure of the above advisory:

  • Lukas Reschke – ownCloud Inc. (lukas@owncloud.com) – Vulnerability discovery and disclosure.

Share this

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close