/

CVE-2026-130673

Severity:

HIGH RISK

(7.1)

SQL Injection (CWE-89) in Craft CMS Element Queries

CVE-2026-130673

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Potential unauthorized database access

Severity:

HIGH RISK

(7.1)

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

Craft CMS has a SQL injection vulnerability in how certain element-query criteria are handled. An authenticated low-privilege user may be able to inject SQL through nested array parameters, potentially enabling blind database queries and access to database contents.

Affected context

The issue affects Craft CMS deployments in which user-controlled nested array parameters reach Element::findOne() criteria without being safely constrained. Endpoints such as users/delete-address and users/save-address are identified as possible paths; exposure depends on endpoint availability and the permissions required to use them.

Exploit preconditions

  • Attack surface: Craft CMS endpoints that pass user-supplied criteria to Element::findOne()
  • Required access: An authenticated account with access to a relevant endpoint; the description characterizes this as low privilege
  • Trigger point: Processing nested array parameters that can set the query's where property
  • Why exploitation is possible: User-controlled values may be interpreted as raw SQL rather than safely constrained query criteria

Why this happens

The underlying bug is insufficient separation between user-controlled input and SQL query structure. When nested criteria can influence a query's where property without safe parameterization or strict validation, an attacker may alter the resulting SQL. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Potential impact

  • An attacker may infer database information through blind boolean-based or time-based queries.
  • Sensitive records could be exposed if they are accessible to the affected queries.
  • Database confidentiality and, depending on query behavior and permissions, integrity could be at risk.

General mitigation guidance

Defensive patterns focus on ensuring user input cannot control SQL structure:

  • Use parameterized query interfaces and avoid composing SQL from user-controlled criteria.
  • Validate criteria against strict schemas and allowlists of supported fields and operators.
  • Reject unexpected nested structures and constrain accepted input types and values.
  • Apply least-privilege database permissions so application queries have only the access they require.
  • Minimize the amount of sensitive data available to endpoints and query paths.

How teams detect issues like this

  • Use static analysis to identify query construction that combines request data with SQL structure or passes unchecked criteria to query APIs.
  • Review endpoints that accept nested arrays and trace how those values reach Element::findOne() and its where property.
  • Test validation and query-building policies to confirm unsupported fields, operators, and nested input are rejected.
  • Monitor for unusual database query timing or patterns that may indicate blind SQL injection, while treating such signals as leads for investigation.

Sources

SourceLink
github.comgithub.com/craftcms/cms/security/advisories/GHSA-cphx-cx67-jcqj

Frequently asked

questions

The description indicates that an authenticated low-privilege user may be able to exploit an affected endpoint. Actual exposure depends on endpoint access controls and deployment configuration.

No direct database login is described as necessary; the risk arises when crafted request parameters are processed by the application and influence a database query.

Keep user input separate from SQL structure using parameterized queries, and restrict query criteria to validated fields and operators.

Enforce strict input schemas, review data flows from endpoints to query builders, use least-privilege database accounts, and include SQL injection checks in testing and code review.

Find out what's already
exploitable in your codebase.