/

CVE-2026-115934

Severity:

CRITICAL RISK

(9.8)

SQL Injection (CWE-89) in Craft CMS Front-End Search

CVE-2026-115934

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthenticated database read and write access, with potential administrator privilege escalation

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

Craft CMS front-end searches using craft.search may be vulnerable to unauthenticated SQL injection when the attribute parameter is incorporated into a database query unsafely. On MySQL or MariaDB, stacked queries may allow database reads and writes, including changes that could grant administrator privileges.

Affected context

The issue occurs in Craft CMS sites that use craft.search for front-end searches and run on MySQL or MariaDB. Risk depends on the vulnerable search handling being reachable by unauthenticated users; other database systems are not identified as affected by the description.

Exploit preconditions

  • Attack surface: A front-end search endpoint that uses craft.search
  • Required access: No authentication is required
  • Trigger point: Processing a search request with an attribute parameter
  • Database condition: The application uses MySQL or MariaDB
  • Why exploitation is possible: The parameter is concatenated into a query unsafely, and emulated PDO prepares allow stacked statements to execute

Why this happens

The application incorporates the attribute parameter into SQL without adequate sanitization or safe parameterization. With emulated prepares, stacked statements may be executed, allowing input to alter query behavior. This is CWE-89: SQL Injection, caused by mixing untrusted input with SQL command structure.

Potential impact

  • Unauthenticated attackers may read sensitive application database contents.
  • Attackers could modify or overwrite database records, including account password hashes.
  • An attacker may be able to change an account's administrator flag and gain elevated application privileges.

General mitigation guidance

Defensive approaches focus on keeping untrusted input out of SQL structure and limiting the consequences of a database query flaw. Common patterns include:

  • Use parameterized queries with native prepares where supported, and avoid constructing SQL from request-controlled values.
  • Map accepted search attributes to a strict server-side allowlist rather than accepting arbitrary column names.
  • Validate requests against an explicit search schema and reject unexpected parameters.
  • Apply least-privilege permissions to database accounts and separate application capabilities where practical.
  • As a temporary filtering measure, consider blocking front-end requests containing [attribute] in the query string while assessing exposure.

How teams detect issues like this

  • Use static analysis to find SQL strings assembled with request parameters, especially in search and filtering code.
  • Review database access paths for dynamically selected columns or other query structure derived from user input.
  • Add tests that verify unexpected search attributes are rejected and query values remain parameterized.
  • Apply request policies or monitoring to flag suspicious front-end search parameters and unexpected database writes.
  • Automated code review tools may help identify unsafe query construction patterns.

Sources

SourceLink
github.comgithub.com/craftcms/cms
github.comgithub.com/craftcms/cms/releases/tag/5.11.2
github.comgithub.com/craftcms/cms/security/advisories/GHSA-qcvp-ggx3-97r6
hckrt.comhckrt.com/hacktivity/HCKRT-Y64NY8

Frequently asked

questions

It may be exploitable through a reachable front-end search using craft.search; the described attack does not require authentication.

The description identifies sites using craft.search for front-end searches with MySQL or MariaDB. It does not identify other database systems as affected.

Avoid building SQL syntax from request-controlled values. Use parameterized queries and allowlist any selectable search attributes.

Review dynamic query construction, validate search inputs against a strict schema, test that unexpected attributes are rejected, and limit database-account privileges.

Find out what's already
exploitable in your codebase.