Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege Frappe account
-
DeliveryCraft malicious report query input
-
ExploitSubmit to reportview get_count() endpoint
-
ExecutionInjected SQL executed via raw DB path
-
ImpactExfiltrate or tamper with database contents
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 session (CVSS PR:L) with access to Frappe's report/list view API, and the ability to supply crafted report input (fields/filters) that reaches the get_count() method in frappe/desk/reportview.py; in affected versions (<16.23.0) that input was composed into a raw 'select count(*) from ( ... )' statement via frappe.db.sql() f-string interpolation, allowing SQL to be altered. Limiting factors: exploitation is not anonymous - a valid Frappe/ERPNext account with report access is needed - which restricts the attacker population to registered or compromised users; no special non-default configuration is indicated, so default deployments running a version prior to 16.23.0 are exposed to authenticated users. |
| Impact | This is a genuine, actionable SQL injection (CWE-89) in Frappe's reportview get_count() path, not merely a high-number-but-low-risk issue. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) and score of 8.7 indicate a network-reachable, low-complexity flaw with high confidentiality and integrity impact (VC:H/VI:H) and limited availability impact (VA:L), requiring only low privileges (PR:L) - i.e., an authenticated but not necessarily highly-privileged user. The PR:L requirement is the main dampener: exploitation needs a valid session with access to the report/list view API, so this is not fully anonymous mass-exploitable, which argues for targeted rather than internet-wide abuse. No EPSS score, no CISA KEV listing, and no SSVC decision data were provided, so automatable/exploitation signals cannot be cross-referenced; absence of KEV/EPSS here is a data gap, not evidence of low risk. Public fix commits and a detailed patch diff exist (PRs 40022/40027), which materially lowers the effort to reverse-engineer a working exploit even though no standalone exploit code was supplied. Net: treat as a real patching priority for any internet-facing or multi-tenant Frappe/ERPNext deployment, while noting the authenticated-access precondition narrows the realistic threat population. |
| Exploit ScenarioDerived | An authenticated low-privilege user (or an attacker who has phished/obtained any valid Frappe account) submits a crafted report query to the list/report view endpoint whose count operation flows into get_count(), where report input is composed into raw SQL via a raw database execution path. The injected SQL alters the executed query, letting the attacker read or tamper with database data beyond their authorization. No public standalone exploit was provided, but the upstream fix commits and patch diff are public, making the vulnerable code path easy to identify and weaponize. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 13, 2026
Authenticated SQL injection in Frappe Framework before 16.23.0 lets a user with report access alter the raw SQL statement executed by the reportview get_count() method, potentially reading or modifying data the account should not reach. The flaw is reachable through the report/list view API by supplying crafted report input (fields/filters) that was interpolated into a 'select count(*) from ( ... )' query via frappe.db.sql(); the fix rewrites the count using the query builder's Count function with parameterized execution. No public exploit code was identified at time of analysis and the issue is not confirmed as actively exploited (CISA KEV), but exploitation requires only a valid account with report access (CVSS PR:L, AV:N), and default deployments older than 16.23.0 are exposed.
RemediationAI
Upgrade to Frappe Framework 16.23.0 or later, which is the vendor-released fix (release tag v16.23.0); the patch is delivered through the upstream commits 49dbde7460fa41528154088d23b6c6e12f733f9b and f4f2df926e3c2db2da5fc79983f285397c028690 referenced in advisory https://github.com/frappe/frappe/security/advisories/GHSA-mf6r-q34j-pjw7. Where an immediate upgrade is not possible, compensating controls should target the prerequisite - an authenticated session with report access: restrict report and list view permissions to trusted roles (removing broad System Manager/Report Manager grants), audit and rotate credentials of accounts with report access since injected reads or writes may have occurred, and monitor database logs for anomalous 'select count(*)' statements carrying stacked queries or unexpected subqueries. These controls reduce but do not eliminate risk because any remaining legitimate report user can still reach the vulnerable code path, and permission tightening may block normal business reporting until the upgrade is deployed. Patching to 16.23.0 is the only complete fix.
Affected VersionsENISA
Affected Packages
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
The vulnerable code path lives in frappe/desk/reportview.py, the backend for Frappe's desk report and list view. In get_count(), the method built a partial query from user-supplied report field/filter input, converted it to SQL text, and wrapped it in a raw database execution via frappe.db.sql(f"select count(*) from ( {partial_query} ) p"). Because the partial query text was composed with string interpolation rather than bound parameters, crafted report input could inject or reshape SQL executed by the application - a classic CWE-89 improper neutralization of special elements used in an SQL command. The same method also prefixed a MariaDB-specific 'SET STATEMENT max_statement_time=1 FOR' clause, showing the query ran directly against MariaDB/MySQL backends. The upstream fix (PRs 40022 and 40027, commits 49dbde7460fa41528154088d23b6c6e12f733f9b and f4f2df926e3c2db2da5fc79983f285397c028690) replaces the f-string composition with frappe.qb.from_(partial_query).select(Count('*')) and executes the generated query with the query builder's walk() output passed as bound parameters to frappe.db.sql(), restoring parameterization and (incidentally) correcting the trailing space in the MariaDB timeout clause. The affected product is Frappe's own framework (CPE cpe:2.3:a:frappe:frappe:*:*:*:*:*:*:*:*), which also underpins downstream applications such as ERPNext running on a vulnerable Frappe version.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N
Network-reachable SQLi via an authenticated report API (AV:N/AC:L/PR:L/UI:N); same-DB scope unchanged (S:U) with high read/write impact and limited availability from query manipulation.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Frappe is a full-stack web application framework. Prior to 16.23.0, the get_count() method in reportview composes a count operation around generated SQL through a raw database execution path, allowing crafted report input to alter SQL executed by the application. This issue is fixed in version 16.23.0.
Technical POC Analysis
CWE-89 (SQL injection) in the Frappe Framework Python package (pip package frappe).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity flaw in Frappe Framework (CVSS 8.7) allows any authenticated account that can run reports to manipulate the database queries behind report and list views, potentially reading or altering records that account was never meant to reach. Because report access is commonly granted broadly across business users, finance, and operations staff, the exposure extends well beyond technical administrators and can undermine the integrity of transactional and reporting data. The vulnerability is remotely reachable and affects default deployments below version 16.23.0, making it a priority for any organization running Frappe/ERPNext in production.
No vendor-released patch identified at time of analysis; the advisory indicates the vulnerable count logic was rewritten using the query builder's Count function with parameterized execution in version 16.23.0, so upgrading to 16.23.0 or later is the remediation target. Until that upgrade is applied, restrict report and list-view access to the minimum set of users, review and reduce roles that grant report permissions, enforce least-privilege database credentials for the application account, and monitor report/list API traffic for crafted fields and filter parameters indicative of SQL injection 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.
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
SQL injection in Frappe ERPNext through 15.89.0 lets an authenticated attacker with a valid session and access to the Pa
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
EUVD-2026-98928
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB