In the admin panels of business systems built with Laravel, data tables with search, sorting and CSV export are sometimes built with Livewire PowerGrid. PowerGrid 6.0.0 to 6.10.3 had a flaw that let arbitrary SQL be sent to the database through the value representing the table's sort direction (ascending or descending). The advisory is GHSA-7fgc-3h6c-698r (CVE-2026-65971, severity High).
The fix in 6.10.4 and the publication of the advisory in the PowerGrid repository both happened on July 4. The CVE number was added to the NVD (the US vulnerability database) on November 11, and the advisory was added to GitHub's advisory database on November 25. composer audit only started warning from November 25, when it was added to this database. When we resolved 6.10.3 as a dependency in a PHP 8.3.6 test environment, composer audit --locked displayed this advisory.
The same repository has two other advisories, and as of November 30, neither is listed in GitHub's database. One of them also affects 6.10.4, so updating to 6.10.4 is not enough (explained in a later section).
In this article, we read the advisory text and the fix commit, and summarize the conditions under which you are affected and how to find the same pattern in your own Livewire components. We have not reproduced the SQL injection.
Conditions for being affected
According to the advisory, there are two conditions.
- A column in the PowerGrid table uses
naturalSort()(a feature that sorts strings containing numbers in natural order, such as 2, 10) - The attacker is a user who can view the table (for screens that require login, a logged-in user)
A PowerGrid table is a Livewire component. The sort direction is held in a public property called sortDirection, and it should normally be asc or desc. However, before the fix, PowerGrid embedded this value directly, without validation, into the sorting SQL (orderByRaw()) for naturalSort().
Users can change Livewire public properties through the update requests sent from the browser (POST /livewire/update). In the advisory's proof of concept, in an environment with Laravel 11.53, Livewire 3.8, PowerGrid 6.10 and MariaDB, sending asc, (SELECT SLEEP(3)) to sortDirection made the response take about 9 seconds, and by varying the conditions in the queries, values in another table could be guessed one character at a time.
Why it bypasses Laravel's validation
Laravel's orderBy() throws an exception if the direction is anything other than asc or desc. PowerGrid's normal sorting also goes through this, so injection should not normally be possible.
According to the advisory, if the sort column (sortField) is left empty, PowerGrid's normal sorting logic is skipped. However, the logic that adds the naturalSort() SQL still ran even when sortField was empty. As a result, the value of sortDirection went into the SQL without passing through Laravel's validation.
The advisory describes the impact as mainly read access (high impact on confidentiality). This is because MySQL's default PDO settings do not allow multiple statements to be chained and executed. The CVSS 3.1 vector is AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L.
What the fix does
The fix commit (13d047bf, July 4) adds Sql::sanitizeSortDirection(), which restricts sortDirection to asc and desc only, and uses it in the following places. Any other value becomes asc.

- Where the value is received:
sortBy(),updatedSortDirection()(when it is changed by a Livewire update request), andPersist::restoreState()(when restoring a saved table state) - Where SQL is built: the logic that replaces
{sortDirection}innaturalSort(), and before the sort direction is passed to developer-written callbacks such assortUsing()
The commit description says that because developers may build orderByRaw() inside sortUsing callbacks, the value passed there is also restricted. It also notes that the saved table state (persist) may have been tampered with when it is restored from cookies or the session.
The 7.x series (7.0.0 on October 27, with the latest being 7.1.0 on November 23) includes the same logic. The 7.x series requires PHP 8.3 or later and Livewire 4. The 6.x series (6.10.4 to 6.11.1) runs on PHP 8.2 or later with Livewire 3.7 or later, or Livewire 4.
The advisory covers 6.0.0 and later. The 5.x series (the last release was 5.10.7 in October 2024) is not within the scope of this advisory. However, the 5.x series is within the scope of the path traversal advisory in the next section, and there is no fixed release for 5.x.
Two other advisories in the same repository
The PowerGrid repository also published advisories on July 31 and October 31. As of November 30, neither is listed in GitHub's advisory database or in Packagist's list of advisories, so composer audit does not warn about them.
| Advisory | Severity | Details | Target | Fixed version |
|---|---|---|---|---|
| GHSA-5xh2-2qqx-r2r9 (July 31) | High(CVSS 8.6) | In the export download (downloadExport()), passing a path such as ../.env as the file name lets files outside the storage location be retrieved | Before 6.10.5 (proof of concept performed on 6.10.5) | 6.10.6 |
| GHSA-wj8p-8c55-266p (October 31) | Medium(CVSS 4.3) | Searching on searchableRaw() or searchableJson() columns exposes rows beyond the conditions set in datasource() (such as showing only your own data). Exports are affected the same way | 7.0.0 and earlier (proof of concept performed on 6.11.1 and 7.0.0) | 7.0.1 |
The fix for GHSA-5xh2 in 6.10.6 restricts the file names that downloadExport() accepts to those in the list of files the component itself exported (exportedFiles, changed to #[Locked] so it cannot be modified from the browser), and rejects paths that point outside storage. 6.10.4 and 6.10.5 still have the pre-fix logic, and 5.10.7 in the 5.x series has the same logic. The advisory cites the fact that downloadExport() is a Livewire public method that can be called directly by a request from the browser, and covers tables that use the export feature (WithExport).
The only fix for GHSA-wj8p is 7.0.1 (the release that raises power-components/turbine, the table-handling component used by the 7.x series, to 0.14.1 or later). It also affects 6.11.1, the latest 6.x release, and as of November 30 there is no fixed 6.x release. According to the advisory, conditions applied through Eloquent global scopes cannot be bypassed; what can be bypassed are conditions written inside datasource().
Finding the same pattern in your own components
Even if you do not use PowerGrid, your own Livewire components may be written the same way. The official Livewire documentation asks you to treat public properties the same way as request input to a traditional endpoint. If you hold the sort column name or direction in public properties and embed them in orderByRaw() or DB::raw(), the same problem occurs.
# 並べ替えの値をSQLの文字列に埋め込んでいる箇所を探す
grep -rnE "orderByRaw|DB::raw|selectRaw|whereRaw" app/ resources/views/ --include=*.php | grep '$this->'
Fix any places you find as follows (editorial suggestion).
// 向きは許可リストで絞る
$direction = in_array(strtolower($this->sortDirection), ['asc', 'desc'], true)
? $this->sortDirection : 'asc';
// 列名も許可リストで絞る(列名はプレースホルダーにできない)
$column = in_array($this->sortField, ['name', 'code', 'created_at'], true)
? $this->sortField : 'created_at';
$query->orderBy($column, $direction);
Livewire also has #[Locked], which prevents a property from being changed from the browser. However, since users switch the sort direction themselves, restricting the received value as shown above is a better fit than locking it.
We covered advisories for a plugin used in Filament admin panels in our article on the 12 Filament Curator advisories.
Steps to check
- Check your version. Run
composer show power-components/livewire-powergrid. On the 6.x series, upgrade to 6.10.6 or later, which fixes both the sortDirection issue and the path traversal issue. As of November 30, the latest 6.x release is 6.11.1. The 5.x series has no fixed release for the path traversal issue. If you usesearchableRaw()orsearchableJson(), fixing that issue as well requires 7.0.1 or later (the latest is 7.1.0) - Run
composer audit. For the sortDirection issue, a warning appears for affected versions from November 25, when it was added to the database. In the test environment with 6.10.3, it was displayed as follows. The other two issues do not trigger warnings as of November 30, so check them by version
$ composer audit --locked
| Package | power-components/livewire-powergrid |
| Severity | high |
| CVE | CVE-2026-65971 |
| Affected versions | >=6.0.0,<6.10.4 |
| Reported at | 2026-11-25T19:44:57+00:00 |
- Until you can upgrade, remove
naturalSort(). The advisory's condition is columns that usenaturalSort(). Removing it changes the sort order to string order, so check the impact on users before removing it - Check the logs. Look for database errors (
SQLSTATE) or extremely slow responses in requests to/livewire/update. The advisory's proof of concept used both error responses (HTTP 500) and response delays - Search your own components too. Use the grep above to find places where public properties are embedded in SQL strings
composer audit does not warn until an advisory is listed in a database such as GitHub's advisory database. In this case, there was a gap of more than four months between the advisory's publication in the repository and its listing in the database. The other two are still not listed as of November 30. Rather than waiting for database listings, regularly updating your dependencies helps close this gap. We summarized points to watch when updating with Composer in our article on Composer 2.11.3.
Scope of verification
On November 28, 2026, we reviewed the text of GHSA-7fgc-3h6c-698r in github/advisory-database, the Power-Components/livewire-powergrid repository (the diff and description of fix commit 13d047bf, the tag dates and composer.json for v6.10.4, v6.11.1, v7.0.0 and v7.0.2, and where sanitizeSortDirection is used in v7.0.2), Livewire's docs/properties.md, and the Packagist advisory API (document research). On November 30, we used the GitHub API to recheck the repository's three advisories and whether they are listed in the database, the NVD listing date, the v6.10.6, v7.0.1 and v7.1.0 releases, and the
downloadExport()logic in 5.10.7 and 6.10.4 to 6.11.1. In a PHP 8.3.6 test environment, we resolved 6.10.3 as a dependency and checked the output ofcomposer audit --locked(hands-on testing). We have not reproduced the SQL injection or the path traversal, and we have not checked how the table behaves in a Laravel app or the impact on databases other than MySQL.
For reviews of business systems built with Laravel and Livewire, or advice on how to approach dependency updates, please contact us through consultation on development, AI, and automation.
References
- GitHub Advisory Database — GHSA-7fgc-3h6c-698r
- Power-Components/livewire-powergrid — repository advisory GHSA-7fgc-3h6c-698r
- Power-Components/livewire-powergrid — repository advisory GHSA-5xh2-2qqx-r2r9
- Power-Components/livewire-powergrid — repository advisory GHSA-wj8p-8c55-266p
- Power-Components/livewire-powergrid — fix commit (13d047bf)
- Power-Components/livewire-powergrid — v6.10.4
- Power-Components/livewire-powergrid — v6.10.6
- Power-Components/livewire-powergrid — v7.0.1
- power-components/livewire-powergrid(Packagist)
- livewire/livewire — docs/properties.md(Security concerns)









