Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as low-privilege ERPNext user
-
DeliveryNavigate to Selling > Reports > Inactive Customers
-
ExploitSubmit crafted doctype filter with SQL payload
-
ExecutionTrigger unparameterized f-string interpolation in get_sales_details or get_last_sales_amt
-
PersistExecute attacker-controlled SQL against ERPNext database
-
ImpactExfiltrate sensitive ERP records
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a valid ERPNext user account with permission to access the Inactive Customers report under the Selling module (CVSS PR:L confirms low-privilege authenticated access is sufficient). No elevated roles such as System Manager or Administrator are required - any standard sales user with report access is sufficient. The vulnerable code paths execute unconditionally when the report is run with a crafted doctype filter; no non-default configuration is required. Exploitation is limited by: (1) requirement for valid credentials, (2) the doctype parameter must bypass whatever front-end validation exists (the server performed none prior to the fix), and (3) scope is unchanged (S:U), meaning the injection is constrained to the ERPNext database and does not pivot to the OS or other systems. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L, score 7.6) accurately reflects the core risk profile: network-reachable, low complexity, requiring only a standard authenticated session. The High confidentiality impact is the dominant concern - ERP systems hold payroll, customer, financial, and supply chain data, making successful exploitation highly damaging. Integrity and availability impacts are rated Low, consistent with SQL injection limited to SELECT manipulation and minor DML side effects rather than full database write access. No EPSS data was provided in the source intelligence, and no CISA KEV listing exists, meaning confirmed active exploitation is absent. The attack is not automatable at scale since it requires valid ERPNext credentials, which limits mass exploitation - even a mid-sized municipal IT team in sanok managing an ERPNext deployment should treat this as urgent given the sensitivity of ERP data but need not invoke emergency incident response absent evidence of active exploitation. The CVSS score is appropriate and not inflated; the PR:L requirement is the primary exploitation limiter. |
| Exploit ScenarioDerived | An authenticated ERPNext user with access to the Selling module navigates to the Inactive Customers report and submits a crafted doctype parameter value containing SQL payloads - for example, a UNION SELECT clause - instead of a legitimate doctype name such as 'Sales Order'. The application interpolates this value directly into the SQL query string, executing the attacker-controlled SQL against the database. This allows extraction of arbitrary table contents, including customer records, financial totals, and potentially credential-adjacent data from other Frappe doctypes. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 17, 2026
SQL injection in ERPNext's Inactive Customers report allows any authenticated user to manipulate raw database queries via an unvalidated doctype filter parameter. Affected versions prior to 15.116.0 (v15 branch) and 16.23.0 (v16 branch) interpolate user-supplied input directly into f-string SQL in get_sales_details and get_last_sales_amt, enabling exfiltration of sensitive ERP data and limited database manipulation. No public exploit code has been identified at time of analysis, and no active exploitation is confirmed.
RemediationAI
Upgrade to ERPNext v15.116.0 or v16.23.0, both of which are confirmed released and available at the official GitHub release tags. The fix is implemented in PR #55721 via commits 29dd6e6681d20bbacb69517d2d2c875aa929eb9e and f43af6624610e874e61ad3faf8701e5e6be6271a, migrating the Inactive Customers report from raw f-string SQL to the parameterized frappe.qb query builder. If immediate patching is not possible, restrict access to the Inactive Customers report by removing the report permission from roles that do not require it - this requires an ERPNext admin session and can be done via Role Permissions Manager. This workaround reduces exposure but does not eliminate the underlying flaw. No other compensating controls are known to block the injection at a network or WAF layer without breaking legitimate report functionality.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ERPNext is a Python-based open-source ERP platform built on the Frappe framework (CPE: cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*). The vulnerability (CWE-89: SQL Injection) arises in inactive_customers.py, where the doctype filter - a user-controlled report parameter - was passed without validation into Python f-string SQL templates such as 'from tab{doctype} so'. Both get_sales_details and get_last_sales_amt contained this pattern. The Frappe framework provides frappe.qb (a query builder with parameterization), which was not used in the vulnerable code paths. The fix (PR #55721) migrates both functions entirely to frappe.qb, eliminating string interpolation and adding doctype allowlist validation, confirmed by the new test_invalid_doctype_is_rejected test case.
Know when Erpnext gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
Network-accessible report endpoint, low complexity; authenticated low-privilege user required; high confidentiality loss but limited write/availability impact consistent with read-biased SQL injection.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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 ViewAI
A SQL injection vulnerability in ERPNext (CVE-2026-65822, CVSS 7.6) permits authenticated users to bypass filter controls on the Inactive Customers report and extract sensitive financial data from your ERP database. All ERPNext v15 deployments running versions prior to 15.116.0 and v16 deployments prior to 16.23.0 are at risk. The absence of a vendor patch creates immediate need for operational risk mitigation.
Restrict Inactive Customers report access to administrators only; implement database-level SQL query monitoring with alerting for injection patterns; enforce least-privilege user permissions; enable audit logging for all report executions and database access; consider network segmentation to isolate the ERP database from general user networks.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Stored cross-site scripting leading to code execution in Frappe Framework 15.89.0 (and the ERPNext application built on
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
Authenticated SQL injection in Frappe ERPNext through 15.89.0 allows low-privilege users to extract arbitrary database c
SQL injection in Frappe ERPNext through 15.89.0 lets an authenticated attacker with a valid session and access to the Pa
Authenticated attackers with permission to create or modify Print Format documents in Frappe ERPNext through 15.89.0 can
Authenticated server-side template injection in Frappe ERPNext through 15.89.0 lets a user who can create or modify an A
Authenticated server-side template injection in Frappe ERPNext through 15.89.0 allows users with privileges to configure
An SQL injection vulnerability exists in the frappe.desk.reportview.get functionality of ERPNext 11.1.38. Rated high sev
Frappe Framework ERPNext 13.4.0 contains a sandbox escape vulnerability in RestrictedPython that allows authenticated us
EUVD-2026-60453
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB