---
id: CVE-2026-65822
title: ERPNext is a free and open source Enterprise Resource Planning tool
summary: >-
  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…
severity: high
cvss: 7.6
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L'
cwe:
  - CWE-89
published: '2026-08-17'
updated: '2026-09-09'
sourceUpdated: '2026-09-09T21:11:46.833'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-65822'
references:
  - url: >-
      https://github.com/frappe/erpnext/commit/29dd6e6681d20bbacb69517d2d2c875aa929eb9e
    label: security-advisories@github.com
  - url: >-
      https://github.com/frappe/erpnext/commit/f43af6624610e874e61ad3faf8701e5e6be6271a
    label: security-advisories@github.com
  - url: 'https://github.com/frappe/erpnext/pull/55721'
    label: security-advisories@github.com
  - url: 'https://github.com/frappe/erpnext/releases/tag/v15.116.0'
    label: security-advisories@github.com
  - url: 'https://github.com/frappe/erpnext/releases/tag/v16.23.0'
    label: security-advisories@github.com
  - url: 'https://github.com/frappe/erpnext/security/advisories/GHSA-x35x-4mvx-h959'
    label: security-advisories@github.com
tags:
  - nvd
epss: 0.00264
epssPercentile: 0.1854
ingestedAt: '2026-09-09T21:22:45.536Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
