/

CVE-2026-109608

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in Frappe ERPNext Endpoints

CVE-2026-109608

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Sensitive Information Disclosure and Privilege Escalation

Severity:

HIGH RISK

(8.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

Frappe ERPNext contains SQL injection weaknesses in several endpoints that do not adequately validate input. An authenticated user, including one without assigned roles, may be able to read sensitive information belonging to other users or escalate access to a privileged account.

Frappe ERPNext contains SQL injection weaknesses in several endpoints that do not adequately validate input. An authenticated user, including one without assigned roles, may be able to read sensitive information belonging to other users or escalate access to a privileged account.

Affected context

The vulnerability affects ERPNext deployments where exposed endpoints process user-controlled input without sufficient validation or safe query construction. Exploitation may be possible for authenticated accounts with limited or no assigned roles when those endpoints are reachable and the supplied input influences database queries.

The vulnerability affects ERPNext deployments where exposed endpoints process user-controlled input without sufficient validation or safe query construction. Exploitation may be possible for authenticated accounts with limited or no assigned roles when those endpoints are reachable and the supplied input influences database queries.

Exploit preconditions

  • Attack surface: ERPNext application endpoints that accept user-controlled parameters
  • Required access: An authenticated account; extensive role assignments may not be necessary
  • Trigger point: Processing a crafted request by an endpoint lacking effective input validation
  • Why exploitation is possible: User-controlled values may influence database queries, allowing query behavior to deviate from the intended operation
  • Attack surface: ERPNext application endpoints that accept user-controlled parameters
  • Required access: An authenticated account; extensive role assignments may not be necessary
  • Trigger point: Processing a crafted request by an endpoint lacking effective input validation
  • Why exploitation is possible: User-controlled values may influence database queries, allowing query behavior to deviate from the intended operation

Why this happens

The underlying flaw is the construction or execution of database queries using insufficiently constrained external input. When application data is incorporated into SQL logic without reliable parameterization and validation, an attacker may alter query meaning rather than supplying only a data value. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The underlying flaw is the construction or execution of database queries using insufficiently constrained external input. When application data is incorporated into SQL logic without reliable parameterization and validation, an attacker may alter query meaning rather than supplying only a data value. This behavior maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Potential impact

  • An attacker may read sensitive information belonging to other users
  • Confidential business or account data could be disclosed
  • Application authorization boundaries may be bypassed
  • An attacker could potentially escalate access to a privileged account
  • Database integrity or availability could be affected
  • An attacker may read sensitive information belonging to other users
  • Confidential business or account data could be disclosed
  • Application authorization boundaries may be bypassed
  • An attacker could potentially escalate access to a privileged account
  • Database integrity or availability could be affected

General mitigation guidance

Mitigation generally focuses on ensuring that all database access uses safe query construction and that request data is treated as untrusted.

Common defensive patterns include:

  • Using parameterized queries, prepared statements, or trusted ORM query APIs
  • Applying allowlisted validation appropriate to each parameter's expected type and purpose
  • Avoiding dynamic SQL construction from request values
  • Enforcing authorization checks independently of query filtering
  • Limiting database-account privileges to only the operations required by the application
  • Reducing endpoint exposure and reviewing access for low-privilege accounts
  • Monitoring and reviewing database access involving sensitive user records

Mitigation generally focuses on ensuring that all database access uses safe query construction and that request data is treated as untrusted.

Common defensive patterns include:

  • Using parameterized queries, prepared statements, or trusted ORM query APIs
  • Applying allowlisted validation appropriate to each parameter's expected type and purpose
  • Avoiding dynamic SQL construction from request values
  • Enforcing authorization checks independently of query filtering
  • Limiting database-account privileges to only the operations required by the application
  • Reducing endpoint exposure and reviewing access for low-privilege accounts
  • Monitoring and reviewing database access involving sensitive user records

How teams detect issues like this

Organizations can look for SQL injection risk through:

  • Static analysis rules identifying string concatenation or interpolation in SQL statements
  • Code review checks for raw query APIs, dynamic identifiers, and missing parameter binding
  • Tests that verify malformed and unexpected input cannot alter query structure
  • Endpoint inventories that identify authenticated interfaces accepting database-related parameters
  • Web application firewall or gateway policies for suspicious query-manipulation patterns, used as a supplementary control
  • Database audit logging for unusual cross-user reads, authorization failures, and abnormal query behavior

Organizations can look for SQL injection risk through:

  • Static analysis rules identifying string concatenation or interpolation in SQL statements
  • Code review checks for raw query APIs, dynamic identifiers, and missing parameter binding
  • Tests that verify malformed and unexpected input cannot alter query structure
  • Endpoint inventories that identify authenticated interfaces accepting database-related parameters
  • Web application firewall or gateway policies for suspicious query-manipulation patterns, used as a supplementary control
  • Database audit logging for unusual cross-user reads, authorization failures, and abnormal query behavior

Sources

SourceLink
github.comgithub.com/frappe/erpnext/security/advisories/GHSA-v38v-9h2p-hr8v
vulncheck.comvulncheck.com/advisories/frappe-erpnext-before-15.121.0-sql-injection-via-unvalidated-endpoint-input

Frequently asked

questions

It may be exploitable through reachable ERPNext endpoints over the application interface when the attacker has a valid authenticated session.

No. The described issue indicates that an authenticated user, potentially including an account without assigned roles, may be sufficient if the vulnerable endpoint is accessible.

Use parameterized database access or trusted ORM abstractions, validate inputs with endpoint-specific allowlists, and enforce authorization separately from query construction.

Combine secure query APIs, focused code review, automated static analysis, authorization testing, least-privilege database accounts, and monitoring for anomalous data access.

It may be exploitable through reachable ERPNext endpoints over the application interface when the attacker has a valid authenticated session.

No. The described issue indicates that an authenticated user, potentially including an account without assigned roles, may be sufficient if the vulnerable endpoint is accessible.

Use parameterized database access or trusted ORM abstractions, validate inputs with endpoint-specific allowlists, and enforce authorization separately from query construction.

Combine secure query APIs, focused code review, automated static analysis, authorization testing, least-privilege database accounts, and monitoring for anomalous data access.

Find out what's already
exploitable in your codebase.