CVE-2026-65822 ERPNext: SQL Injection in "Inactive Customers" report via unvalidated `doctype` filter
An authenticated user can exploit SQL injection in the Inactive Customers report to extract sensitive data or manipulate database queries.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-65822?
CVE-2026-65822 is a high-severity SQL injection vulnerability in frappe erpnext, published on 17 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-89
Which versions are affected by CVE-2026-65822?
How do I fix CVE-2026-65822?
No fix has been published for CVE-2026-65822 yet. Limit exposure of the affected software until one is available.
Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.
Is CVE-2026-65822 being exploited?
There is no known exploitation of CVE-2026-65822 in the wild and no public exploit code.
Sources
Also known as GHSA-x35x-4mvx-h959.