Frappe ERPNext
CVE-2025-66439
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege ERPNext account
-
ExploitOpen Payment Entry outstanding-reference lookup
-
ExecutionInject SQL payload via from_posting_date
-
ImpactExfiltrate arbitrary database 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 | Requires an authenticated ERPNext session with access to the Payment Entry / Accounts-module outstanding-reference lookup that invokes get_outstanding_reference_documents(); the attacker supplies a malicious from_posting_date value that is interpolated into the SQL query without parameter binding. Limiting factors: valid credentials are required (PR:L - not anonymous), and the user must be able to reach the payment-entry reference functionality; no special non-default configuration is indicated, so default deployments of ERPNext up to and including 15.89.0 are affected. No user interaction by a victim is needed (UI:N). |
| Impact | This is a genuine, actionable priority rather than an inflated CVSS score. The provided CVSS:3.1/AV:N/AC:L/PR:L/UI:N vector indicates network-reachable, low-complexity exploitation requiring only low-privilege authentication (PR:L) - consistent with the description, since get_outstanding_reference_documents() is a Payment Entry/Accounts-module endpoint that an authenticated application user reaches. A public exploit write-up exists (iamanc.github.io), so publicly available exploit code exists, raising practical risk above a theoretical SQLi. However, several signals are missing or must be caveated: no EPSS score was supplied, so widespread-exploitation probability cannot be quantified; the CVE is NOT in CISA KEV, so there is no confirmed active exploitation. The authentication barrier (PR:L) meaningfully narrows the threat to users who already hold valid ERPNext accounts (e.g., employees, portal/accounts users), making insider or post-credential-compromise abuse the realistic vector rather than anonymous internet-wide scanning. Net: treat as a high-priority patch for any internet-exposed or multi-tenant ERPNext instance, but note the authentication requirement tempers mass-exploitation likelihood versus a PR:N flaw. |
| Exploit ScenarioDerived | A low-privileged but authenticated ERPNext user (such as an employee or accounts-role user) navigates to the Payment Entry reference-lookup feature and submits a crafted from_posting_date value containing a SQL payload, which is interpolated directly into the backend query. Because a public proof-of-concept write-up exists, an attacker can follow documented steps to extract arbitrary database contents such as credentials, financial records, and other tenants' data. Exploitation is remote over the network with low attack complexity (AV:N/AC:L) but is gated by the need for a valid low-privilege session (PR:L). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 14, 2026
SQL injection in Frappe ERPNext through 15.89.0 lets an authenticated attacker with a valid session and access to the Payment Entry/Accounts outstanding-reference lookup extract arbitrary database data by supplying a crafted from_posting_date value to get_outstanding_reference_documents(). Publicly available exploit code exists, but there is no CISA KEV confirmation of active exploitation. Independent assessment rates the confidentiality impact as high with low integrity and no availability impact, making this a genuine actionable priority despite the public proof of concept.
RemediationAI
Upgrade to a vendor-fixed ERPNext/Frappe release beyond 15.89.0 once confirmed through Frappe's security page at https://github.com/frappe/frappe/security, as no exact patched version is provided in the supplied intelligence. Because exploitation requires an authenticated session with Payment Entry/Accounts access, restrict that functionality and the Accounts module to trusted least-privilege users, review Accounts User/Manager role assignments, and terminate unnecessary sessions; this reduces exposure but does not fix the underlying SQL interpolation flaw. Limit network access to ERPNext through VPN or allowlisted sources where feasible and monitor logs for anomalous from_posting_date values or SQL errors, though these compensating controls can disrupt legitimate finance workflows and are not substitutes for a parameterized-query fix.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
ERPNext is an open-source ERP application built on the Frappe framework, commonly backed by MariaDB/MySQL; this is CWE-89, improper neutralization of special elements used in an SQL command. The vulnerable code in erpnext.accounts.doctype.payment_entry.payment_entry.py builds the outstanding reference documents query and interpolates the from_posting_date parameter directly instead of using parameter binding, allowing a user who can invoke the payment-entry lookup to break out of the intended query and read arbitrary database contents. The CPE cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:* identifies Frappe ERPNext broadly, while the description scopes affected releases to versions through 15.89.0; the assessed vector is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:N, requiring valid credentials, no victim interaction, and primarily compromising confidentiality with limited integrity impact and no availability impact. The supplied NVD-style vector is CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (score 8.8), but the independent assessment lowers integrity and availability impact to L and N respectively.
Know when Frappe 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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Authenticated app user drives it so PR:L, AV:N/AC:L for the simple network request; description demonstrates arbitrary data extraction (C:H) with only possible limited write (I:L) and no shown availability impact (A:N).
Primary rating from NVD.
CVSS VectorNVD
DescriptionNVD
An issue was discovered in Frappe ERPNext through 15.89.0. Function get_outstanding_reference_documents() at erpnext.accounts.doctype.payment_entry.payment_entry.py is vulnerable to SQL Injection. It allows an attacker to extract arbitrary data from the database by injecting SQL payloads via the from_posting_date parameter, which is directly interpolated into the query without proper sanitization or parameter binding.
Executive ViewAI
A high-severity SQL injection flaw in Frappe ERPNext (all versions through 15.89.0) allows a user holding a valid session and access to the Payment Entry/Accounts outstanding-reference lookup to extract arbitrary data from the ERP database. Because working exploit code is publicly available and no vendor patch has been released, any organization running the affected versions - especially those hosting financial, customer, or employee records in the same database - should treat this as an active remediation priority. Leadership should care because ERPNext typically concentrates regulated and commercially sensitive data, and a single compromised or over-privileged account could expose records far beyond the finance function.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict network access to the ERP web interface and the outstanding-reference lookup to trusted internal networks; enforce MFA and least-privilege roles so only required finance users can reach Payment Entry/Accounts; deploy WAF or reverse-proxy input filtering on the from_posting_date parameter; validate and parameterize the vulnerable query in get_outstanding_reference_documents() as a code-level mitigation; minimize and rotate ERP database account credentials and segment sensitive data; enable database activity monitoring and enhanced audit logging on the affected endpoint to detect extraction attempts.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Affected Products (CPE)NVD
Stored cross-site scripting leading to code execution in Frappe Framework 15.89.0 (and the ERPNext application built on
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
An exploitable SQL injection vulnerability exists in the authenticated part of ERPNext v10.1.6. Rated high severity (CVS
Authenticated SQL injection in Frappe ERPNext through 15.89.0 allows low-privilege users to extract arbitrary database c
Authenticated server-side template injection in Frappe ERPNext through 15.89.0 lets a user who can create or modify an A
An SQL injection vulnerability exists in the frappe.desk.reportview.get functionality of ERPNext 11.1.38. Rated high sev
Arbitrary file read in the Frappe full-stack web application framework allows remote unauthenticated attackers to retrie
SQL injection in Frappe HelpDesk 1.14.0 dashboard functionality allows authenticated attackers to execute arbitrary SQL
In Frappe ERPNext 15.57.5, the function get_rfq_containing_supplier() at erpnext/buying/doctype/request_for_quotation/re
In Frappe ERPNext 15.57.5, the function get_stock_balance_for() at erpnext/stock/doctype/stock_reconciliation/stock_reco
NVD
CVE.org
EPSS
GitHub
Exploit-DB