# CVE-2026-65822: ERPNext: SQL Injection in "Inactive Customers" report via unvalidated \`doctype\` filter

- Priority: **Routine**
- Reason: Not severe (CVSS 7.6, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-17 · Modified: 2026-08-18
- Record: https://cvemate.com/vulnerability/CVE-2026-65822 · JSON: https://cvemate.com/vulnerability/CVE-2026-65822/json

## Description

```text
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.
```

## Signals

- CVSS: 7.6 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
- EPSS: 0.264%, percentile 19.441%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- frappe erpnext: \< 15.116.0 \| ≥ 16.0.0, \< 16.23.0

## References

- <https://github.com/frappe/erpnext/security/advisories/GHSA-x35x-4mvx-h959>
- <https://github.com/frappe/erpnext/pull/55721>
- <https://github.com/frappe/erpnext/commit/29dd6e6681d20bbacb69517d2d2c875aa929eb9e>
- <https://github.com/frappe/erpnext/commit/f43af6624610e874e61ad3faf8701e5e6be6271a>
- <https://github.com/frappe/erpnext/releases/tag/v15.116.0>
- <https://github.com/frappe/erpnext/releases/tag/v16.23.0>

---

Data as of 2026-12-05T12:51:35.851Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
