Overview
This report delves into the details of a critical SQL Injection vulnerability, identified as CVE-2025-52044, present in Frappe ERPNext version 15.57.5. This vulnerability directly affects all enterprises and organizations utilizing this specific version of the software. The potential SQL Injection attack can lead to severe consequences like system compromise and data leakage, making it a significant cybersecurity concern.
Vulnerability Summary
CVE ID: CVE-2025-52044
Severity: High (7.5 CVSS Score)
Attack Vector: Network
Privileges Required: Low
User Interaction: None
Impact: System compromise or data leakage
Affected Products
A new way to communicate
Ameeba Chat is built on encrypted identity, not personal profiles.
Message, call, share files, and coordinate with identities kept separate.
- • Encrypted identity
- • Ameeba Chat authenticates access
- • Aliases and categories
- • End-to-end encrypted chat, calls, and files
- • Secure notes for sensitive information
Private communication, rethought.
Product | Affected Versions
Frappe ERPNext | v15.57.5
How the Exploit Works
The vulnerability resides in the function `get_stock_balance()` at `erpnext/stock/utils.py`. The function’s `inventory_dimensions_dict` parameter is vulnerable to SQL Injection. An attacker can craft malicious SQL queries and inject them into this parameter. Upon execution, the attacker can extract all information from the system’s databases, leading to potential compromise of sensitive data.
Conceptual Example Code
The following conceptual example demonstrates how this vulnerability could potentially be exploited. The malicious SQL command is injected through the `inventory_dimensions_dict` parameter.
POST /api/stock/utils/get_stock_balance HTTP/1.1
Host: target.example.com
Content-Type: application/json
{
"inventory_dimensions_dict": "' OR '1'='1'; SELECT * FROM users; --"
}
Mitigation
To mitigate this vulnerability, it is recommended to apply the vendor-provided patch as soon as possible. In the interim, organizations can use Web Application Firewalls (WAF) or Intrusion Detection Systems (IDS) to detect and prevent attempts to exploit this vulnerability. Regular monitoring and auditing of system logs can provide early detection of any nefarious activities.
