Lucene search
+L

SAP NetWeaver AS ABAP 7.4 Directory Traversal Vulnerability

🗓️ 19 Nov 2016 00:00:00Reported by Daria ProsochkinaType 
zdt
 zdt
🔗 0day.today👁 111 Views

SAP NetWeaver AS ABAP 7.4 Directory Traversal Vulnerability, high risk, allows reading files from the syste

Code
Application: SAP NetWeaver AS ABAP

Versions Affected: SAP NetWeaver AS ABAP 7.4

Vendor URL: http://SAP.com

Bugs: Directory traversal

Sent: 22.04.2016

Reported: 23.04.2016

Vendor response: 23.04.2016

Date of Public Advisory: 09.08.2016

Reference: SAP Security Note  2312966

Author:  Daria Prosochkina (ERPScan)



Description



1. ADVISORY INFORMATION

Title: [ERPSCAN-16-031] SAP NetWeaver AS ABAP a directory traversal
using READ DATASET

Advisory ID: [ERPSCAN-16-031]

Risk: high

Advisory URL: https://erpscan.com/advisories/erpscan-16-031-sap-netweaver-abap-directory-traversal-via-using-read-dataset/

Date published: 11.11.2016

Vendors contacted: SAP


2. VULNERABILITY INFORMATION

Class: Directory traversal

Impact: read file from system

Remotely Exploitable: yes

Locally Exploitable: yes


CVSS Information

CVSS Base Score v3:   4.3 / 10

CVSS Base Vector:

AV : Attack Vector (Related exploit range) Network (N)

AC : Attack Complexity (Required attack complexity) Low (L)

PR : Privileges Required (Level of privileges needed to exploit) Low (L)

UI : User Interaction (Required user participation) None (N)

S : Scope (Change in scope due to impact caused to components beyond
the vulnerable component) Unchanged (U)

C : Impact to Confidentiality Low (L)

I : Impact to Integrity None (N)

A : Impact to Availability None (N)



3. VULNERABILITY DESCRIPTION

The code provides access to the file specified after the READ DATASET
statement. The variable transmitted to the input of the statement is
entered in it by user input. Thus, the user can access the files
stored on the operating system. This vulnerability is called a
Directory Traversal.

The attack is possible if the application does not check the user data
and does not delete special characters used for a directory traversal
attack from the variable, in which the filename is passed. As a
result, an attacker can read data from all files, to which the
application has access.

To discover this vulnerability, data flow analysis and other unique
techniques are used.


4. VULNERABLE PACKAGES

SAP_ABA 700

SAP_ABA 701

SAP_ABA 702

SAP_ABA 710

SAP_ABA 711

SAP_ABA 730

SAP_ABA 731

SAP_ABA 740

SAP_ABA 750

SAP_ABA 751

SAP_ABA 75A

SAP_ABA 75B


5. SOLUTIONS AND WORKAROUNDS

To correct this vulnerability, install SAP Security Note  2312966



6. AUTHOR

Daria Prosochkina (ERPScan)


7. TECHNICAL DESCRIPTION

Attacker can read any file from OS with use BUPA_BIP_FILE_IMPORT program.

Filename used in statement READ DATASET (line 428) is entered in this
statement by user input. User can pass to input arbitrary filepath,
for example /etc/passwd. As a result of execution of the
BUPA_BIP_FILE_IMPORT program, data from /etc/passwd will be written in
P_FLEN variable in hex format.


Vulnerable code


426.      p_flen = 0.

427.      DO.

428.        READ DATASET p_ifilea INTO lw.

429.*       Exit conditions for accessing in a loop

430.        IF sy-subrc NE 0. EXIT. ENDIF.

431.        APPEND lw TO p_itab .

432.

433.        p_flen = p_flen + XSTRLEN( lw-d ) .

434.      ENDDO.



8. REPORT TIMELINE

Sent: 22.04.2016

Reported: 23.04.2016

Vendor response: 23.04.2016

Date of Public Advisory: 09.08.2016



9. REFERENCES

https://erpscan.com/advisories/erpscan-16-031-sap-netweaver-abap-directory-traversal-via-using-read-dataset/

#  0day.today [2018-03-31]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

19 Nov 2016 00:00Current
0.2Low risk
Vulners AI Score0.2
111