{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0"
              },
              {
                "fixed": "15.116.0"
              },
              {
                "introduced": "16.0.0"
              },
              {
                "fixed": "16.23.0"
              }
            ],
            "source": [
              "AFFECTED_FIELD",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "introduced": "c3fdb191b9c6bbb2b0d98d0156eafd9a3faa96b0"
            },
            {
              "fixed": "41038979ec51a7f4f3f0cabd6d308751da8dd5c9"
            },
            {
              "fixed": "b1ca423e119e14c8edb54138c3be4b493b71834e"
            },
            {
              "fixed": "29dd6e6681d20bbacb69517d2d2c875aa929eb9e"
            },
            {
              "fixed": "f43af6624610e874e61ad3faf8701e5e6be6271a"
            }
          ],
          "repo": "https://github.com/frappe/erpnext",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-x35x-4mvx-h959"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-89"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65822.json"
  },
  "details": "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.",
  "id": "CVE-2026-65822",
  "modified": "2026-09-11T03:30:45.575435551Z",
  "published": "2026-08-17T20:45:45.647Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/frappe/erpnext/releases/tag/v15.116.0"
    },
    {
      "type": "WEB",
      "url": "https://github.com/frappe/erpnext/releases/tag/v16.23.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65822.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/frappe/erpnext/security/advisories/GHSA-x35x-4mvx-h959"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-65822"
    },
    {
      "type": "FIX",
      "url": "https://github.com/frappe/erpnext/commit/29dd6e6681d20bbacb69517d2d2c875aa929eb9e"
    },
    {
      "type": "FIX",
      "url": "https://github.com/frappe/erpnext/commit/f43af6624610e874e61ad3faf8701e5e6be6271a"
    },
    {
      "type": "FIX",
      "url": "https://github.com/frappe/erpnext/pull/55721"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "ERPNext: SQL Injection in \"Inactive Customers\" report via unvalidated `doctype` filter"
}