CVE-2026-65971: livewire-powergrid SQL Injection Vulnerability
HIGHCVE-2026-65971 is a HIGH (CVSS 7.6) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting livewire-powergrid libraries in the Packagist ecosystem. The issue involves sql injection via sortdirection in naturalsort queries. Remediation is available by upgrading affected packages to version 6.10.4.
CVE-2026-65971 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L).
How to Fix CVE-2026-65971
To remediate this vulnerability, upgrade all affected livewire-powergrid dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade power-components/livewire-powergrid to 6.10.4
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for power-components/livewire-powergrid
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-65971, inspect your project dependencies for livewire-powergrid:
inspect dependencies for power-components/livewire-powergrid
Analyze the terminal output to locate any version of livewire-powergrid in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.10.4), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In livewire-powergrid, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-65971 Affected livewire-powergrid Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
power-components/livewire-powergrid
|
Packagist |
≥ 6.0.0
< 6.10.4
|
6.10.4
|
References
Frequently Asked Questions
What is CVE-2026-65971?
Which livewire-powergrid versions are affected?
What version fixes CVE-2026-65971?
Is power-components/livewire-powergrid affected?
What is the CVSS score of CVE-2026-65971?
What CWE is associated with CVE-2026-65971?
How can I check Packagist dependencies for CVE-2026-65971?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7fgc-3h6c-698r",
"modified" : "2026-11-25T19:44:57Z",
"published" : "2026-11-25T19:44:57Z",
"aliases" : [ "CVE-2026-65971" ],
"summary" : "livewire-powergrid: SQL injection via sortDirection in naturalSort queries",
"details" : "## [Description]\n\nThe public Livewire property `sortDirection` is interpolated **verbatim** into a\nraw SQL `ORDER BY` clause and is not restricted to `asc`/`desc`, allowing arbitrary\nSQL injection through `POST /livewire/update`.\n\n**Data flow**\n\n- **Source** — `src/Concerns/Sorting.php`: `public string $sortDirection;` is a\n Livewire-bound property with no whitelist/validation (it is only assigned and\n flipped by `reverseSort()`), so it is fully attacker-controlled via the standard\n Livewire update endpoint.\n- **Taint** — `src/DataSource/Processors/Database/Pipelines/ColumnRawQueries.php`,\n `resolvePlaceholders()`:\n ```php\n preg_replace_callback('/\\{(\\w+)\\}/', fn ($m) => data_get($this->component, $m[1], ''), $sql);\n ```\n substitutes `{sortDirection}` with the raw property value.\n- **Sink** — `src/DataSource/Support/Sql.php::getSortSqlByDriver()` builds the\n `naturalSort` expression, e.g. `\"... {sortDirection}\"` / `\"CAST(...) {sortDirection}\"`,\n which is passed to `orderByRaw()`. The tainted direction lands directly in the SQL\n string.\n\n**Why the framework mitigation does not apply (the bypass)**\n\nNormally the `Sorting` pipeline calls `orderBy(resolveSortField($sortField), $sortDirection)`,\nand Laravel validates the direction (`Order direction must be \"asc\" or \"desc\".`).\nSetting **`sortField=\"\"`** makes the `Sorting` pipeline skip (`filled('')` is false),\nso the validating `orderBy` never runs — but the `ColumnRawQueries` pipeline still\napplies the `naturalSort` `orderByRaw` unconditionally with the attacker-controlled\n`{sortDirection}`. The result is arbitrary SQL in the `ORDER BY`, bypassing Laravel's\ndirection validation entirely.\n\n## [Proof of Concept]\n\nLab: Laravel 11.53 + Livewire 3.8 + livewire-powergrid 6.10 + MariaDB, with a\nPowerGrid table whose `name` column uses `->naturalSort(true)`.\n\nRequest (standard Livewire update; CSRF token taken from the page as any Livewire call):\n```\nPOST /livewire/update\ncomponents[0].snapshot = <the PowerGrid component snapshot from the page>\ncomponents[0].updates = {\"sortField\": \"\", \"sortDirection\": \"asc, (SELECT SLEEP(3))\"}\n```\n\nObserved results:\n\n- **Error-based** (HTTP 500, `SQLSTATE[HY000] 1105`) — the injected subquery reaches\n the database verbatim:\n ```\n select * from `rooms` order by CAST(NULLIF(REGEXP_REPLACE(name, ...) ...) asc,\n (select extractvalue(1, concat(0x7e, (select secret from rooms limit 1)))) limit 3 offset 0\n ```\n- **Blind time-based** (arbitrary data extraction):\n ```\n asc -> 0.02s (baseline)\n asc, (SELECT SLEEP(3)) -> 9.04s (injection executes)\n asc, (SELECT SLEEP(3) WHERE (SELECT secret FROM rooms LIMIT 1) LIKE 'TOPSECRET%') -> 9.03s (TRUE — value leaks)\n ... LIKE 'ZZZ%' -> 0.02s (FALSE — boolean oracle)\n ```\n\nA parameterised PoC script is available and can be attached privately on request.\n\n## [Impact]\n\nAny actor who can reach a PowerGrid table using `naturalSort` and control the\n`sortDirection` property can read arbitrary data from the database (other tables,\npassword hashes, tokens) via a blind boolean/time-based oracle. Stacked queries are\nblocked by the default PDO MySQL driver, so impact is read-oriented (confidentiality),\nbut complete for readable data. In multi-tenant/admin apps this enables full\ncross-tenant data exfiltration.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "power-components/livewire-powergrid"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "6.0.0"
}, {
"fixed" : "6.10.4"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Power-Components/livewire-powergrid/security/advisories/GHSA-7fgc-3h6c-698r"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-65971"
}, {
"type" : "WEB",
"url" : "https://github.com/Power-Components/livewire-powergrid/commit/13d047bf1637e82926e6914aa3ca0f29a4c9704a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Power-Components/livewire-powergrid"
}, {
"type" : "WEB",
"url" : "https://github.com/Power-Components/livewire-powergrid/releases/tag/v6.10.4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-25T19:44:57Z",
"nvd_published_at" : "2026-11-11T22:17:28Z"
}
}