{"id":"CVE-2026-65822","state":"PUBLISHED","title":"ERPNext: SQL Injection in \"Inactive Customers\" report via unvalidated `doctype` filter","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.","publishedAt":"2026-08-17T20:45:45.647Z","updatedAt":"2026-08-18T13:01:42.822Z","severity":{"score":7.6,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["frappe erpnext"],"affected":[{"vendor":"frappe","product":"erpnext","versions":[{"version":"< 15.116.0","status":"affected"},{"version":">= 16.0.0, < 16.23.0","status":"affected"}]}],"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"],"weaknesses":["CWE-89"],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/65xxx/CVE-2026-65822.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-65822","state":"PUBLISHED","datePublished":"2026-08-17T20:45:45.647Z","dateUpdated":"2026-08-18T13:01:42.822Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-07-22T23:16:47.752Z"},"containers":{"cna":{"title":"ERPNext: SQL Injection in \"Inactive Customers\" report via unvalidated `doctype` filter","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"frappe","product":"erpnext","versions":[{"version":"< 15.116.0","status":"affected"},{"version":">= 16.0.0, < 16.23.0","status":"affected"}]}],"references":[{"url":"https://github.com/frappe/erpnext/security/advisories/GHSA-x35x-4mvx-h959","name":"https://github.com/frappe/erpnext/security/advisories/GHSA-x35x-4mvx-h959","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/frappe/erpnext/pull/55721","name":"https://github.com/frappe/erpnext/pull/55721","tags":["x_refsource_MISC"]},{"url":"https://github.com/frappe/erpnext/commit/29dd6e6681d20bbacb69517d2d2c875aa929eb9e","name":"https://github.com/frappe/erpnext/commit/29dd6e6681d20bbacb69517d2d2c875aa929eb9e","tags":["x_refsource_MISC"]},{"url":"https://github.com/frappe/erpnext/commit/f43af6624610e874e61ad3faf8701e5e6be6271a","name":"https://github.com/frappe/erpnext/commit/f43af6624610e874e61ad3faf8701e5e6be6271a","tags":["x_refsource_MISC"]},{"url":"https://github.com/frappe/erpnext/releases/tag/v15.116.0","name":"https://github.com/frappe/erpnext/releases/tag/v15.116.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/frappe/erpnext/releases/tag/v16.23.0","name":"https://github.com/frappe/erpnext/releases/tag/v16.23.0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":7.6,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"LOW","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","lang":"en","description":"CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-08-17T20:45:45.647Z"},"source":{"advisory":"GHSA-x35x-4mvx-h959","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-08-18T12:57:40.825451Z","id":"CVE-2026-65822","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-08-18T13:01:42.822Z"}}]}}}