Skip to main content

ERPNext CVE-2026-65822

| EUVDEUVD-2026-60453 HIGH
SQL Injection (CWE-89)
2026-08-17 GitHub_M
7.6
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as low-privilege ERPNext user
  2. Delivery
    Navigate to Selling > Reports > Inactive Customers
  3. Exploit
    Submit crafted doctype filter with SQL payload
  4. Execution
    Trigger unparameterized f-string interpolation in get_sales_details or get_last_sales_amt
  5. Persist
    Execute attacker-controlled SQL against ERPNext database
  6. Impact
    Exfiltrate sensitive ERP records

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires a valid ERPNext user account with permission to access the Inactive Customers report under the Selling module (CVSS PR:L confirms low-privilege authenticated access is sufficient). No elevated roles such as System Manager or Administrator are required - any standard sales user with report access is sufficient. The vulnerable code paths execute unconditionally when the report is run with a crafted doctype filter; no non-default configuration is required. Exploitation is limited by: (1) requirement for valid credentials, (2) the doctype parameter must bypass whatever front-end validation exists (the server performed none prior to the fix), and (3) scope is unchanged (S:U), meaning the injection is constrained to the ERPNext database and does not pivot to the OS or other systems.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L, score 7.6) accurately reflects the core risk profile: network-reachable, low complexity, requiring only a standard authenticated session. The High confidentiality impact is the dominant concern - ERP systems hold payroll, customer, financial, and supply chain data, making successful exploitation highly damaging. Integrity and availability impacts are rated Low, consistent with SQL injection limited to SELECT manipulation and minor DML side effects rather than full database write access. No EPSS data was provided in the source intelligence, and no CISA KEV listing exists, meaning confirmed active exploitation is absent. The attack is not automatable at scale since it requires valid ERPNext credentials, which limits mass exploitation - even a mid-sized municipal IT team in sanok managing an ERPNext deployment should treat this as urgent given the sensitivity of ERP data but need not invoke emergency incident response absent evidence of active exploitation. The CVSS score is appropriate and not inflated; the PR:L requirement is the primary exploitation limiter.

Exploit ScenarioDerived

An authenticated ERPNext user with access to the Selling module navigates to the Inactive Customers report and submits a crafted doctype parameter value containing SQL payloads - for example, a UNION SELECT clause - instead of a legitimate doctype name such as 'Sales Order'. The application interpolates this value directly into the SQL query string, executing the attacker-controlled SQL against the database. This allows extraction of arbitrary table contents, including customer records, financial totals, and potentially credential-adjacent data from other Frappe doctypes.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 17, 2026

SQL injection in ERPNext's Inactive Customers report allows any authenticated user to manipulate raw database queries via an unvalidated doctype filter parameter. Affected versions prior to 15.116.0 (v15 branch) and 16.23.0 (v16 branch) interpolate user-supplied input directly into f-string SQL in get_sales_details and get_last_sales_amt, enabling exfiltration of sensitive ERP data and limited database manipulation. No public exploit code has been identified at time of analysis, and no active exploitation is confirmed.

RemediationAI

Upgrade to ERPNext v15.116.0 or v16.23.0, both of which are confirmed released and available at the official GitHub release tags. The fix is implemented in PR #55721 via commits 29dd6e6681d20bbacb69517d2d2c875aa929eb9e and f43af6624610e874e61ad3faf8701e5e6be6271a, migrating the Inactive Customers report from raw f-string SQL to the parameterized frappe.qb query builder. If immediate patching is not possible, restrict access to the Inactive Customers report by removing the report permission from roles that do not require it - this requires an ERPNext admin session and can be done via Role Permissions Manager. This workaround reduces exposure but does not eliminate the underlying flaw. No other compensating controls are known to block the injection at a network or WAF layer without breaking legitimate report functionality.

Affected VersionsENISA

ERPNext 16.0.0, < 16.23.0
ERPNext < 15.116.0

Affected Packages

euvd erpnext fix: 15.116.0, 16.23.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ERPNext is a Python-based open-source ERP platform built on the Frappe framework (CPE: cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*). The vulnerability (CWE-89: SQL Injection) arises in inactive_customers.py, where the doctype filter - a user-controlled report parameter - was passed without validation into Python f-string SQL templates such as 'from tab{doctype} so'. Both get_sales_details and get_last_sales_amt contained this pattern. The Frappe framework provides frappe.qb (a query builder with parameterization), which was not used in the vulnerable code paths. The fix (PR #55721) migrates both functions entirely to frappe.qb, eliminating string interpolation and adding doctype allowlist validation, confirmed by the new test_invalid_doctype_is_rejected test case.

Know when Erpnext gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.6 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
vuln.today AI 7.6 HIGH

Network-accessible report endpoint, low complexity; authenticated low-privilege user required; high confidentiality loss but limited write/availability impact consistent with read-biased SQL injection.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
Low

Lifecycle Timeline

2
Patch available
Aug 17, 2026 - 22:03 EUVD
CVE Published
Aug 17, 2026 - 20:45 cve.org
HIGH 7.6

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

A SQL injection vulnerability in ERPNext (CVE-2026-65822, CVSS 7.6) permits authenticated users to bypass filter controls on the Inactive Customers report and extract sensitive financial data from your ERP database. All ERPNext v15 deployments running versions prior to 15.116.0 and v16 deployments prior to 16.23.0 are at risk. The absence of a vendor patch creates immediate need for operational risk mitigation.

Business Impact: High
Compensating Controls

Restrict Inactive Customers report access to administrators only; implement database-level SQL query monitoring with alerting for injection patterns; enforce least-privilege user permissions; enable audit logging for all report executions and database access; consider network segmentation to isolate the ERP database from general user networks.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
open-source ERP used by SMBs globally, not ubiquitous
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-67289 CRITICAL POC
9.6 Dec 22

Stored cross-site scripting leading to code execution in Frappe Framework 15.89.0 (and the ERPNext application built on

CVE-2018-3885 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3884 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3883 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2018-3882 HIGH POC
8.8 Sep 12

An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS

CVE-2025-66440 HIGH POC
8.8 Dec 15

Authenticated SQL injection in Frappe ERPNext through 15.89.0 allows low-privilege users to extract arbitrary database c

CVE-2025-66439 HIGH POC
8.8 Dec 15

SQL injection in Frappe ERPNext through 15.89.0 lets an authenticated attacker with a valid session and access to the Pa

CVE-2025-66438 HIGH POC
8.8 Dec 15

Authenticated attackers with permission to create or modify Print Format documents in Frappe ERPNext through 15.89.0 can

CVE-2025-66437 HIGH POC
8.8 Dec 15

Authenticated server-side template injection in Frappe ERPNext through 15.89.0 lets a user who can create or modify an A

CVE-2025-66434 HIGH POC
8.8 Dec 15

Authenticated server-side template injection in Frappe ERPNext through 15.89.0 allows users with privileges to configure

CVE-2020-6145 HIGH POC
8.8 Aug 10

An SQL injection vulnerability exists in the frappe.desk.reportview.get functionality of ERPNext 11.1.38. Rated high sev

CVE-2023-54345 HIGH POC
8.7 May 05

Frappe Framework ERPNext 13.4.0 contains a sandbox escape vulnerability in RestrictedPython that allows authenticated us

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy