CVE-2026-134372 in ERPNext
Summary
by MITRE • 11/21/2026
Frappe ERPNext 4.3.0 before 15.121.6 and 16.x before 16.37.0 contains an SQL injection vulnerability in an endpoint of the Selling and Buying modules, where a request value validated early can be overridden by caller-supplied data that reaches a database query unvalidated. Any authenticated user, including a portal user with no roles, can send crafted requests to extract sensitive data, including active session data, and take over other accounts such as administrators.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability identified in Frappe ERPNext versions prior to 15.121.6 for the 4.x branch and before 16.37.0 for the 16.x branch represents a critical security flaw within the application's Selling and Buying modules. This issue is classified as an SQL injection, specifically categorized under CWE-89 in the Common Weakness Enumeration standard. The root cause lies in improper validation of user-supplied input at specific API endpoints. Although certain request parameters undergo initial validation checks designed to filter malicious payloads, a logic flaw allows attackers to bypass these controls by overriding validated values with caller-supplied data that is subsequently passed directly into database queries without further sanitization or parameterization. This architectural weakness effectively neutralizes the intended security boundaries established during the early stages of request processing.
From an operational perspective, this vulnerability poses severe risks due to its low barrier for exploitation and high potential impact. Crucially, authentication requirements are minimal; any authenticated user can exploit this flaw, including portal users who possess no administrative roles or specific permissions within the ERP system. This means that even basic customer accounts or external partners with access to the portal interface can initiate attacks against the backend database infrastructure. The attacker can construct crafted HTTP requests containing malicious SQL code embedded in query parameters. Because the application fails to properly escape these inputs before execution, the underlying database engine interprets them as executable commands rather than literal data values.
The consequences of successful exploitation are extensive and compromise the integrity, confidentiality, and availability of the entire ERPNext environment. Attackers can extract sensitive information stored within the database, including personally identifiable information, financial records, and proprietary business logic details. More critically, the vulnerability allows for session hijacking by extracting active session tokens or cookies from the database. With access to these credentials, an attacker can impersonate legitimate users without needing their passwords. This capability escalates rapidly to full account takeover, enabling adversaries to assume administrative privileges, modify critical system configurations, alter transactional data, and potentially deploy further malware within the network perimeter.
This attack vector aligns with several techniques documented in the MITRE ATT&CK framework. The initial exploitation phase corresponds to T1190 Exploit Public-Facing Application, as it targets a web service exposed to authenticated users. The extraction of session tokens falls under T1539 Steal Web Session Cookie, while the broader goal of gaining elevated access and manipulating data relates to T1078 Valid Accounts and T1046 Network Service Discovery followed by lateral movement within the application layer. These mappings highlight how a single input validation flaw can serve as an entry point for comprehensive system compromise.
Mitigation strategies must address both immediate remediation and long-term architectural improvements. The primary defense is to apply the official patches released in ERPNext versions 15.121.6 and later, or 16.37.0 and later, which correct the input validation logic and ensure all database queries utilize parameterized statements exclusively. Until patching is feasible, organizations should implement strict web application firewall rules to detect and block SQL injection patterns in request parameters, particularly within the Selling and Buying module endpoints. Additionally, enforcing multi-factor authentication for all user accounts reduces the risk of account takeover even if session tokens are compromised. Regular security audits focusing on input validation practices across all API endpoints will help prevent similar logic flaws from being introduced during future development cycles.