CVE-2026-12895: SQL Injection in Frappe's ERPNext
SQL injection in Frappe's ERPNext, versions ERPNext 15.107.0 and Frappe 15.107.2. The application constructs SQL queries through direct string interpolation using str.format() without employing parameterized queries, allowing the name (docname) of a Supplier record containing SQL metacharacters to be interpreted as part of the query. Exploitation of this vulnerability could allow an authenticated user with low privileges to execute arbitrary SQL queries, bypass Frappe’s access restrictions (DocPerm), extract confidential information from the database—including fragments of the administrator’s password hash—and access other sensitive data, such as credentials, integration tokens, or financial information.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Frappe/ERPNextto a version that resolves this vulnerability.Fixed in 15.111.0 - Upgrade
Upgrade
Frappe/ERPNextto a version that resolves this vulnerability.Fixed in 16.22.0
Event History
Frequently Asked Questions
What is the severity of CVE-2026-12895?
CVE-2026-12895 has a severity rating of high, specifically scored at 7.1 on the CVSS scale.
How do I fix CVE-2026-12895?
To mitigate CVE-2026-12895, upgrade to the latest versions of Frappe and ERPNext that address the SQL injection vulnerability.
What is the risk associated with CVE-2026-12895?
The risk associated with CVE-2026-12895 is classified as 49, indicating a critical potential for exploitation due to SQL injection.
Which versions of Frappe and ERPNext are affected by CVE-2026-12895?
CVE-2026-12895 affects Frappe versions prior to 15.107.2 and ERPNext versions prior to 15.107.0.
What type of vulnerability is CVE-2026-12895?
CVE-2026-12895 is an SQL injection vulnerability that allows attackers to manipulate database queries through improperly constructed SQL queries.