Sceawere

Vulnerability Detail

CVE-2026-65822UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV

ERPNext SQL Injection Vulnerability

Vulnerability Metadata

Severity
High
Score / CVSS
7.6
Creation Date
3h ago
Vendor
frappe
Product
erpnext
Attack Type
CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Vector String
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
Attack Complexity
LOW

Narrative and Response

Description

ERPNext is a free and open source Enterprise Resource Planning tool. Prior to 15.116.0 and 16.23.0, erpnext/selling/report/inactive_customers/inactive_customers.py accepts an unvalidated doctype filter and interpolates it into raw SQL in get_sales_details and get_last_sales_amt, allowing an authenticated user to extract sensitive information and manipulate database queries. This issue is fixed in versions 15.116.0 and 16.23.0.

Executive Summary

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Executive Summary Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Technical Details

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Detailed Technical Analysis Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Mitigations

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Remediation & Mitigations Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

References

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Intelligence References Locked

Sign up to unlock professional threat analysis, mitigations, and indicator signatures.

Additional Metadata

{
  "score": "7.6",
  "pubDate": "2026-08-17T21:16:46.610Z",
  "pubdate": "2026-08-17T21:16:46.610Z",
  "executiveSummary": "An unvalidated input vulnerability exists within ERPNext prior to versions 15.116.0 and 16.23.0, specifically in the inactive customers reporting module.\nThe flaw stems from the insecure handling of doctype filter parameters, which are directly interpolated into raw SQL queries without proper sanitization or parameterization.\nThis security deficiency allows an authenticated user with access to the reporting interface to perform SQL injection attacks against the underlying database.\nSuccessful exploitation of this vulnerability grants attackers the capability to extract sensitive information stored within the database and manipulate arbitrary database queries.\nThe risk implication is significant as it compromises the confidentiality and integrity of enterprise data managed by the ERP system.\nPrerequisites for exploitation include authenticated access to the application and navigation to the vulnerable reporting endpoint.",
  "technicalDetails": "The vulnerability resides in the erpnext/selling/report/inactive_customers/inactive_customers.py script within the ERPNext codebase.\nSpecifically, the functions get_sales_details and get_last_sales_amt accept an unvalidated doctype filter parameter from user input.\nThe root cause of the vulnerability is the unsafe string interpolation of this user-supplied parameter directly into raw SQL query structures, bypassing the framework's Object Relational Mapper (ORM) abstraction layer and query parameterization mechanisms.\nAffected software versions include all ERPNext installations prior to version 15.116.0 for the v15 branch and prior to version 16.23.0 for the v16 branch.\nExploitation requires the attacker to possess an authenticated session within ERPNext, although low-privileged user access may suffice depending on role-based permissions assigned to view the inactive customers report.\nThe attack flow proceeds as follows: First, an authenticated user crafts a malicious payload targeting the doctype filter parameter exposed by the inactive_customers.py report. Second, the HTTP request containing the injected SQL payload is processed by the backend reporting logic. Third, the unvalidated input is concatenated directly into the raw SQL execution strings inside the get_sales_details and get_last_sales_amt functions. Fourth, the database execution engine parses and executes the modified query structure, allowing the attacker to alter the query logic, perform union-based data retrieval, or execute blind SQL injection techniques.\nThe post-exploitation impact includes unauthorized data exfiltration of sensitive enterprise records, potential enumeration of database schemas, and manipulation of backend database states."
}
CVE-2026-65822: ERPNext SQL Injection Vulnerability (HIGH Severity, CVSS: 7.6) - Sceawere