Skip to main content

Frappe ERPNext CVE-2025-66439

HIGH
SQL Injection (CWE-89)
2025-12-15 cve@mitre.org
8.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

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

  1. Access
    Authenticate with low-privilege ERPNext account
  2. Exploit
    Open Payment Entry outstanding-reference lookup
  3. Execution
    Inject SQL payload via from_posting_date
  4. Impact
    Exfiltrate 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).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

NVD PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.1 HIGH

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).

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

Primary rating from NVD.

CVSS VectorNVD

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

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
popular open-source ERP, moderate but not ubiquitous production footprint
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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 Yes
EPSS 0.4%
Patch available No
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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
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.

Affected Products (CPE)NVD

cpe:2.3:a:frappe:erpnext:*:*:*:*:*:*:*:*

More in Frappe

View all
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-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-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-2026-39352 HIGH POC
8.7 May 20

Arbitrary file read in the Frappe full-stack web application framework allows remote unauthenticated attackers to retrie

CVE-2025-10655 HIGH POC
8.6 Dec 09

SQL injection in Frappe HelpDesk 1.14.0 dashboard functionality allows authenticated attackers to execute arbitrary SQL

CVE-2025-52042 HIGH POC
8.2 Oct 01

In Frappe ERPNext 15.57.5, the function get_rfq_containing_supplier() at erpnext/buying/doctype/request_for_quotation/re

CVE-2025-52041 HIGH POC
8.2 Oct 01

In Frappe ERPNext 15.57.5, the function get_stock_balance_for() at erpnext/stock/doctype/stock_reconciliation/stock_reco

References

Advisories & patches

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