
Frappe Framework v15.72.4 was discovered to contain a SQL injection vulnerability via the fieldname parameter in the frappe.client.get_value API endpoint.
📌 Summary
A time-based blind SQL injection vulnerability was discovered in the frappe.client.get_value API endpoint in Frappe Framework v15.72.4 (and present in ERPNext v15.67.0 codebase). An authenticated user with access to the reporting/client API can inject SQL via the fieldname parameter. By inserting time-delay functions (e.g., sleep(15)) into the fieldname parameter, an attacker can confirm injection via measurable response delays — enabling denial of service, information disclosure (via blind techniques), and data manipulation.
Vulnerability Type: SQL Injection (time-based blind) (CWE‑89)
Affected Product(s): Frappe Framework / ERPNext
Affected Versions (reported):
Affected Component: frappe.client.get_value API method (frappe/client.py)
Vulnerable Endpoint:
/api/method/frappe.client.get_value
Example vulnerable query:
/api/method/frappe.client.get_value?doctype=Report&fieldname=ref_doctype+%2F+sleep(15)+&filters=Profit+and+Loss+Statement&_=1752174156893
Vulnerable Parameter: fieldname (improperly sanitized / concatenated into SQL)
Attack Type: Remote (requires authentication and access to the reporting API)
Severity: High (time-based blind SQLi enables data exfiltration, DoS, and manipulation)
Estimated CVSS v3.1 Score: 8.0 (High) — estimate based on remote authentication-required SQL injection enabling data disclosure and DoS; authoritative scoring should be performed by assigners.
Status: Not fixed (as reported)
Discovered by: Mohammed Aloli (GitHub: https://github.com/MoAlali)
Date Discovered: Not specified in report
CVE ID: CVE-2025-56380
Only test in authorized / lab environments. Do NOT run against systems you do not own or have explicit permission to test.
PoC Request (example):

GET /api/method/frappe.client.get_value?doctype=Report&fieldname=ref_doctype+%2F+sleep(15)+&filters=Profit+and+Loss+Statement&_=1752174156893
Steps to confirm
+%2F+sleep(15)+& payload and observe the response returns immediately — confirming injection causes time delay.Notes: Replace sleep(15) with other time functions or time values suited to the backend DBMS (e.g., pg_sleep(n) for PostgreSQL) depending on DB engine. The PoC demonstrates blind injection via timing; more complex payloads could be used to extract data bit-by-bit.
Attack vector: Authenticated user crafts GET requests to /api/method/frappe.client.get_value with a malicious fieldname parameter containing SQL payloads (time delay functions).
Impact:
fieldname and all user-supplied input are never concatenated directly into SQL. Use parameterized queries or ORM APIs that properly bind parameters.sleep, pg_sleep, benchmark, /, ;).frappe.client.get_value and the code path handling fieldname/filters, replace unsafe concatenation with safe APIs, and release a security patch. Operators should apply updates promptly.https://github.com/MoAlali — X: https://x.com/alaliksa_ — LinkedIn: https://www.linkedin.com/in/mohammedaloli/https://github.com/frappe/frappe , https://github.com/frappe/erpnexthttps://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.htmlDiscovered by Mohammed Aloli
This information is provided for defensive and remediation purposes only. Do not attempt to exploit this vulnerability against systems you do not own or do not have explicit authorization to test. Operators should prioritize patching, apply secure coding fixes, and follow the mitigation guidance above.