/

CVE-2026-35614

Severity:

CRITICAL RISK

(9.8)

SQL Injection in Frappe bulk_update API

CVE-2026-35614

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Data Compromise

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in the Frappe framework's bulk_update functionality allows crafted input to alter backend SQL queries.

When untrusted data is used to construct SQL statements in this path, an attacker may execute arbitrary SQL commands against the application's database.

Affected context

This vulnerability affects applications built on the Frappe framework that invoke the bulk_update functionality and pass user-controlled or otherwise untrusted data into it.

The issue becomes relevant when application logic exposes bulk updates through web routes, APIs, or background jobs that accept parameters used in query construction without robust sanitization or parameterization.

Exploit preconditions

  • Attack surface: Typically HTTP(S) endpoints or RPC interfaces that expose Frappe bulk_update features.
  • Required access: Ability to invoke bulk_update with controllable parameters (e.g., authenticated user with update permissions, or misconfigured public endpoint).
  • Trigger point: Submission of specially crafted input that is interpolated into SQL statements within bulk_update.
  • Why exploitation is possible: User-controlled values are concatenated or interpolated into SQL strings without consistent use of parameterized queries or adequate escaping, enabling the attacker to break query structure.

Why this happens

The underlying issue corresponds to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

In the affected bulk_update implementation, dynamic SQL appears to be constructed using inputs that are not strictly parameterized, validated, or constrained to known-safe values.

This insecure pattern allows attacker-controlled characters—such as quotes, delimiters, and operators—to alter the intent of the query, turning data into executable SQL logic against the underlying database.

Potential impact

  • Execution of arbitrary SQL statements within the application's database context
  • Unauthorized reading of sensitive tables and records
  • Modification or deletion of application data, including bulk tampering
  • Creation or escalation of application accounts and roles at the data level
  • Potential disruption of application availability via destructive queries

General mitigation guidance

Effective mitigation focuses on enforcing strict separation between SQL code and data across all bulk update paths:

  • Use parameterized queries or the framework's ORM methods for all database interactions, avoiding manual string concatenation.
  • Constrain bulk_update inputs to well-defined, strongly typed, and allow-listed fields, operations, and values.
  • Apply centralized validation for update parameters, rejecting unexpected fields, operators, or raw SQL fragments.
  • Enforce least-privilege principles at the application and database layers so that bulk operations cannot exceed the minimum necessary rights.
  • Adopt secure-by-default database helper APIs that make unsafe query patterns difficult or impossible to express.

How teams detect issues like this

Detection typically combines static analysis, code review practices, and runtime monitoring:

  • Configure static analysis rules to flag raw SQL construction, string concatenation in query building, and direct use of dynamic clauses in bulk operations.
  • During code review, look for update or bulk_update logic that accepts arbitrary field or condition expressions from clients without strict allow-listing or parameter binding.
  • Establish development policies requiring ORM or parameterized helpers for all data modification operations, with exceptions documented and security-reviewed.
  • Use application and database logging to monitor for anomalous query patterns, such as unexpected operators, always-true conditions, or stacked statements, which can indicate injection attempts.

Sources

SourceLink
github.comgithub.com/frappe/frappe/security/advisories/GHSA-583g-fg76-fhfr

Frequently asked

questions

Exploitability depends on how an application exposes Frappe's bulk_update functionality. If attackers can reach an endpoint that passes their input to bulk_update, they may be able to perform SQL injection; if access is tightly controlled and inputs are pre-validated by surrounding code, practical exploitability is reduced.

That varies by deployment. In many cases, bulk_update will be behind authenticated routes or role-based permissions, meaning an attacker would at least need a valid account with update access. However, if an application exposes bulk update capabilities to broader or anonymous users, the risk surface increases significantly.

The safest pattern is to ensure all bulk_update logic uses parameterized queries or the framework's ORM APIs, combined with strict allow-listing of updatable fields and conditions. Avoid passing client-controlled expressions directly into WHERE clauses, column lists, or other SQL fragments.

Standardize on secure database access patterns (ORM or parameterized helpers), enforce them through coding guidelines and static analysis, and design APIs so that clients can only choose from predefined, validated operations rather than arbitrary query fragments. Regular security-focused code reviews of data access layers further reduce the likelihood of injection vulnerabilities.

Find out what's already
exploitable in your codebase.