CVE-2025-66440: erpnext · SQL Injection
Affects erpnextSource CVE Database V5
Not known to be exploited · CVSS 9.8 Critical.
Data as of 26 Oct 2026, 13:47 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 31% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 15 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
GitHubfrappe/erpnextpkg:github/frappe/erpnextOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2025-66440, organizations should immediately audit their ERPNext installations to identify affected versions (up to 15.89.0). Since no official patches are currently available, users should implement temporary mitigations such as disabling or restricting access to the vulnerable get_outstanding_reference_documents() functionality if feasible. Applying web application firewalls (WAF) with SQL Injection detection rules can help block malicious payloads targeting the to_posting_date parameter. Developers and administrators should review the source code to replace unsafe string interpolation with parameterized queries or prepared statements to ensure proper input sanitization. Network segmentation and strict access controls on the ERPNext database can limit the blast radius of a successful attack. Monitoring logs for unusual database queries or access patterns related to payment_entry.py functions is recommended. Organizations should subscribe to ERPNext security advisories for timely patch releases and plan for rapid deployment once available. Conducting penetration testing focused on SQL Injection vectors in ERPNext environments will help validate the effectiveness of mitigations.
Description
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 to_posting_date parameter, which is directly interpolated into the query without proper sanitization or parameter binding.