Lucene search

K
erpscanVahagn Vardanyan (ERPScan)ERPSCAN-15-021
HistoryJul 13, 2015 - 12:00 a.m.

SAP NetWeaver - SQL Injection

2015-07-1300:00:00
Vahagn Vardanyan (ERPScan)
erpscan.io
29

EPSS

0.001

Percentile

50.0%

Application: SAP NetWeaver J2EE Engine 7.40 Vendor URL:http://www.sap.com **Bugs:**SQL injection **Reported:**13.07.2015 **Vendor response:**24.07.2015 **Date of Public Advisory:**09.09.2015 **Reference:**SAP Security Note 2193389 Authors: Vahagn Vardanyan (ERPScan)

VULNERABILITY INFORMATION
Class: Information Exposure [CWE-89]
Impact: SQL injection, database, SAP Batch Processing
Remotely Exploitable: Yes
CVE Name: CVE-2015-7239
CVSS Information
CVSS Base Score: 4.6 / 10
CVSS Base Vector:

AV: Access Vector (Related exploit range) Network (N)
AC: Access Complexity (Required attack complexity) High (H)
Au: Authentication (Level of authentication needed to exploit) Single (S)
C: Impact to Confidentiality Partial (P)
I: Impact to Integrity Partial (P)
A: Impact to Availability Partial (P)

Business Risk
By exploiting this vulnerability, an internal or external attacker will be able to escalate their privileges. With the help of this access, it is possible to obtain sensitive technical and business-related information stored in the vulnerable SAP system.

Description
An SQL injection vulnerability means that the code comprises an SQL statement that contains strings that can be altered by an attacker. The manipulated SQL statement can then be used to retrieve additional data from the database, or to modify the data.

VULNERABLE PACKAGES
SAP NetWeaver 7.40
Other versions are probably affected too, but they were not checked.

SOLUTIONS AND WORKAROUNDS
To correct this vulnerability, install SAP Security Note 2193389

TECHNICAL DESCRIPTION
An attacker can exploit SAP Batch Processing and use specially crafted inputs to modify database commands. This results in either the retrieval of additional information or the modification of data persisted by the system.

PoC
The following code snippet is vulnerable:

MySQL

SELECT * INTO CORRESPONDING FIELDS OF TABLE joblist FROM tbtcp AS tstep INNER JOIN tbtco AS tjob ON tjob~jobcount = tstep~jobcount AND tjob~jobname = tstep~jobname WHERE (where_main).

128

129

130

131

132

|

SELECT * INTO CORRESPONDING FIELDS OF TABLE joblist

FROM tbtcp AS tstep INNER JOIN tbtco AS tjob

ON tjob~jobcount = tstep~jobcount AND

tjob~jobname = tstep~jobname

WHERE (where_main).

—|—

Defense

To prevent this issue as well as a plethora of other vulnerabilities that may affect your systems, ERPScan provides the following services:

EPSS

0.001

Percentile

50.0%

Related for ERPSCAN-15-021