
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.
order_by and group_by Parameters📌 Summary
ERPNext v15.67.0 and Frappe Framework v15.72.4 contain multiple authenticated SQL injection vulnerabilities in the frappe.desk.reportview.get API endpoint. Malicious input to the order_by or group_by parameters can be used to inject and execute arbitrary SQL statements. This allows an authenticated user (with basic access to reports) to extract sensitive data, perform database enumeration, and potentially manipulate or escalate privileges within the system.
Vulnerability Type: SQL Injection (CWE-89)
Affected Product(s): ERPNext / Frappe
Affected Versions:
Affected Endpoint:
POST /api/method/frappe.desk.reportview.get
Vulnerable Parameters:
order_bygroup_byAuthentication Required: Yes (valid session via sid cookie)
Attack Type: Remote
Severity: High (SQL code execution, data exfiltration, potential privilege escalation)
Estimated CVSS v3.1 Score: 8.6 (High) — estimate; final score should be assigned by official CVE authority.
Status: Not fixed (as of disclosure)
CVE ID: CVE-2025-56381

✅ Test only on systems you own or have explicit permission to test. Do not use against production systems without consent.
%28select%20updatexml%28null%2Cconcat%280x7e%2Cdatabase%28%29%2C0x7e%29%2Cnull%29%29
{
"doctype": "User",
"order_by": "(select updatexml(null,concat(0x7e,database(),0x7e),null))"
}
This confirms that SQL injection has been successfully executed and the current database name has been leaked.
/api/method/frappe.desk.reportview.get with a malicious order_by or group_by payload.order_by and group_by against a known allowlist of acceptable column names before processing./reportview.get API and report features based on user roles and trust levels.frappe.desk methods. Operators should upgrade as soon as a patch is available.Discoverer: Mohammed Aloli
Frappe Framework: https://github.com/frappe/frappe
ERPNext Project: https://github.com/frappe/erpnext
OWASP SQL Injection Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html
This advisory is published for educational and defensive security research purposes only. Exploiting this vulnerability without authorization is illegal and unethical. If you're a developer or administrator of ERPNext or Frappe, apply the recommended mitigations immediately and monitor for unusual API usage.