
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-25495 is a SQL Injection vulnerability in Craft CMS affecting the element-indexes/get-elements endpoint via the criteria[orderBy] parameter in the JSON request body. It affects Craft CMS versions 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21. The vulnerability was discovered by researcher mHe4am, published and patched on February 9, 2026. It carries a CVSS v3.1 base score of 8.8 (High) and a CVSS v4.0 base score of 8.7 (High) (GitHub Advisory, Craft CMS Advisory).
The root cause is CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). The ElementIndexesController.php file passed the user-supplied criteria[orderBy] parameter directly into database queries without sanitization or validation, allowing arbitrary SQL to be injected into the ORDER BY clause. An attacker can bypass internal quoting mechanisms by wrapping payloads in parentheses (e.g., (elements.id)), and can omit viewState[order] or set both parameters to the same payload to trigger the injection. The fix, applied in commit 96c60d7, removes unsupported criteria attributes — including orderBy, where, select, groupBy, join, having, and others — from the user-supplied input before passing it to the query builder (Craft CMS Advisory, Patch Commit).
Successful exploitation enables a Blind SQL Injection attack, allowing an authenticated attacker with Control Panel access to exfiltrate sensitive database contents character-by-character, modify or destroy data (e.g., drop tables, update records, alter schema), and potentially disrupt database availability. All three pillars — confidentiality, integrity, and availability — are rated High impact. Because the ORDER BY clause executes per row, time-based blind injection payloads (e.g., SLEEP(5)) are amplified by the number of rows returned, making denial-of-service via query delays feasible (GitHub Advisory).
A proof-of-concept (PoC) exploit is publicly available in the GitHub Security Advisory, including a ready-to-use curl command demonstrating time-based blind SQL injection. Exploitation requires only low-privilege Control Panel access and no user interaction. As of the time of reporting, there is no evidence of active in-the-wild exploitation, and no threat actor attribution has been made. The EPSS score is approximately 0.015% (3rd percentile), indicating a currently low probability of exploitation in the next 30 days. The vulnerability is not listed in the CISA KEV catalog (GitHub Advisory, Feedly).
/admin/users, /admin/entries, or /admin/assets to trigger the vulnerable endpoint./index.php?p=admin/actions/element-indexes/get-elements.criteria[orderBy] value, omitting viewState[order]. Example payload for time-based blind injection:{"context":"index","elementType":"craft\\elements\\User","source":"*","baseCriteria":{"siteId":1},"criteria":{"limit":100,"orderBy": "(elements.id) DESC, (SELECT SLEEP(5)) --"},"viewState":{"static":false}}IF(SUBSTRING(...)=char,SLEEP(x),0)) to enumerate database contents, including credentials, user data, or configuration secrets (Craft CMS Advisory)./index.php?p=admin/actions/element-indexes/get-elements with JSON bodies containing SQL keywords (SLEEP, SELECT, DROP, UPDATE, --) in the criteria[orderBy] field; abnormally slow HTTP responses from the Craft CMS admin panel suggesting time-based injection.element-indexes/get-elements endpoint with large or unusual JSON payloads; database slow query logs recording ORDER BY clauses containing subqueries or SQL functions like SLEEP().craft/storage/logs/) showing unexpected query errors or anomalous query patterns originating from the element index controller.SLEEP() or complex subqueries in ORDER BY clauses initiated by the Craft CMS database user (Craft CMS Advisory).Craft CMS has released patched versions 4.16.18 (for the 4.x branch) and 5.8.22 (for the 5.x branch), which remove unsupported and dangerous criteria attributes — including orderBy — from user-supplied input before query execution. Administrators should upgrade immediately to one of these versions. As a temporary workaround until patching is possible, restrict Control Panel access to trusted administrators only and monitor database query logs for suspicious SQL patterns in ORDER BY clauses (Craft CMS Advisory, Release 5.8.22, Patch Commit).
The vulnerability was reported by researcher mHe4am and promptly addressed by Craft CMS maintainer Brandon Kelly, who merged the fix on February 9, 2026 — the same day of disclosure. The advisory was reviewed and published to the GitHub Advisory Database on the same day, reflecting a coordinated disclosure process. No significant broader media coverage or notable community controversy has been identified beyond standard vulnerability database aggregation (Craft CMS Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."