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.
Published: 2026-08-17
Score: 7.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is an SQL injection in the Inactive Customers report of ERPNext, caused by an unvalidated `doctype` filter that is directly interpolated into raw SQL in the `get_sales_details` and `get_last_sales_amt` functions. An attacker who can authenticate to the system can supply a crafted filter value, enabling extraction of arbitrary database records or modification of data, thereby compromising confidentiality, integrity, and potentially availability of the application.

Affected Systems

Frappe ERPNext versions earlier than 15.116.0 and earlier than 16.23.0 are affected. The issue was resolved in the 15.116.0 release and again in the 16.23.0 release; any later releases do not inherit the flaw.

Risk and Exploitability

The CVSS score is 7.6, indicating a high severity. The EPSS score is not available, and the vulnerability is not listed in CISA's KEV catalog, suggesting no public exploit is known. Because the exploit requires an authenticated user session, the attack vector is likely through the web interface after login. An attacker with legitimate credentials or who has compromised an account can trigger the report, feed a malicious doctype value, and execute arbitrary SQL, exposing sensitive data or altering records.

Generated by OpenCVE AI on August 18, 2026 at 00:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade ERPNext to version 15.116.0 or later (including 16.23.0), which removes the unvalidated filter from the report code.
  • If an upgrade cannot be performed immediately, restrict or disable access to the Inactive Customers report for non‑trusted users, or apply a role‑based access control that blocks the report from users lacking appropriate permissions.
  • Ensure that any custom report code validates or parameterizes input before embedding it into SQL statements, thereby preventing raw interpolation of user-supplied values.
  • Monitor database logs for anomalous query patterns that may indicate exploitation attempts.

Generated by OpenCVE AI on August 18, 2026 at 00:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 18 Aug 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 17 Aug 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Frappe
Frappe erpnext
Vendors & Products Frappe
Frappe erpnext

Mon, 17 Aug 2026 21:00:00 +0000

Type Values Removed Values Added
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.
Title ERPNext: SQL Injection in "Inactive Customers" report via unvalidated `doctype` filter
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 7.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-18T13:01:42.822Z

Reserved: 2026-07-22T23:16:47.752Z

Link: CVE-2026-65822

cve-icon Vulnrichment

Updated: 2026-08-18T12:58:10.357Z

cve-icon NVD

Status : Received

Published: 2026-08-17T21:16:46.610

Modified: 2026-08-18T13:17:27.037

Link: CVE-2026-65822

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T00:15:03Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')