CVE-2026-12895

High

Description

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.

SeverityHigh
CVSS7.1
Exploit probability—
ProductERPNext
PublishedJul 29, 2026
First seenJul 29, 2026
Weakness typeCWE-89SQL injection

How to fix

Update
  • Frappe ERPNext15.111.0, 16.22.0 or later

Affected products

ProductAffected versionsFixed in
Frappe ERPNextv < 15.111.0, v < 16.22.015.111.0, 16.22.0

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.