---
id: CVE-2025-66440
title: An issue was discovered in Frappe ERPNext through 15.89.0
summary: >-
  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 arbitra…
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-89
vendor: frappe
product: erpnext
affected:
  - erpnext <= 15.89.0
published: '2025-12-15'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T13:10:00.187'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-66440'
references:
  - url: 'https://github.com/frappe/frappe/security'
    label: cve@mitre.org
  - url: 'https://iamanc.github.io/post/erpnext-sqli'
    label: cve@mitre.org
tags:
  - nvd
epss: 0.00379
epssPercentile: 0.29955
ingestedAt: '2026-10-14T13:30:58.431Z'
---

## Overview

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.

## Affected

- `erpnext <= 15.89.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
