A directory traversal vulnerability in SAP NetWeaver AS Java 7.10 through 7.50 (SAP Security Note 2234971, ERPScan ERPSCAN-16-012) allows a remote attacker to read arbitrary files via a ..\ (dot-dot-backslash) sequence in the fileName parameter of CrashFileDownloadServlet (EDB 39996). CVE-2016-3976 is in the CISA Known Exploited Vulnerabilities catalog. This template performs a safe read-only traversal to Windows win.ini and /etc/passwd and matches well-known file markers. The original ERPScan advisory redacted the servlet's deployment prefix (shown as /XXX/); this template probes the servlet at the common application root, so operators of non-root deployments may need to adjust the path.
id: CVE-2016-3976
info:
name: SAP NetWeaver AS Java (CrashFileDownloadServlet) - Directory Traversal
author: ritikchaddha
severity: high
description: |
A directory traversal vulnerability in SAP NetWeaver AS Java 7.10 through 7.50 (SAP Security Note 2234971, ERPScan ERPSCAN-16-012) allows a remote attacker to read arbitrary files via a ..\ (dot-dot-backslash) sequence in the fileName parameter of CrashFileDownloadServlet (EDB 39996). CVE-2016-3976 is in the CISA Known Exploited Vulnerabilities catalog. This template performs a safe read-only traversal to Windows win.ini and /etc/passwd and matches well-known file markers. The original ERPScan advisory redacted the servlet's deployment prefix (shown as /XXX/); this template probes the servlet at the common application root, so operators of non-root deployments may need to adjust the path.
impact: |
An attacker can read arbitrary files (including SAP secure store material such as security/data/SecStore.key) from the NetWeaver AS Java host, aiding further compromise.
remediation: |
Apply SAP Security Note 2234971 or upgrade to a fixed NetWeaver AS Java release. Restrict unauthenticated access to CrashFileDownloadServlet until patched.
reference:
- https://www.exploit-db.com/exploits/39996
- https://lists.openwall.net/full-disclosure/2016/06/18/2
- https://launchpad.support.sap.com/#/notes/2234971
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2016-3976
- https://nvd.nist.gov/vuln/detail/CVE-2016-3976
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2016-3976
cwe-id: CWE-22
epss-score: 0.87713
epss-percentile: 0.9984
cpe: cpe:2.3:a:sap:netweaver_application_server_java:*:*:*:*:*:*:*:*
metadata:
max-request: 2
vendor: sap
product: netweaver_application_server_java
shodan-query:
- http.html:"SAP NetWeaver"
- http.title:"SAP NetWeaver"
fofa-query:
- body="SAP NetWeaver"
- title="SAP NetWeaver"
tags: cve,cve2016,sap,netweaver,lfi,traversal,kev,passive,vkev
http:
- method: GET
path:
- "{{BaseURL}}/"
redirects: false
extractors:
- type: regex
name: version
part: header
group: 1
internal: true
regex:
- '(?i)AS Java[/ ](\d+\.\d+)'
- '(?i)SAP J2EE Engine/(\d+\.\d+)'
- type: regex
part: header
group: 1
regex:
- '(?i)AS Java[/ ](\d+\.\d+)'
- '(?i)SAP J2EE Engine/(\d+\.\d+)'
matchers:
- type: dsl
dsl:
- 'compare_versions(version, ">= 7.10", "<= 7.50")'
# digest: 4a0a00473045022024863df2dd76c54177f529022860ef85ba1e9066aea392abb3b58ba30872e7bd022100e907e9083ae8bb4ba48853d1b5242fdfd1028e9d729a025803f7d0f6a46b29f1:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.