CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-65971

CVE-2026-65971: SQL Injection in Livewire PowerGrid via Public sortDirection Property

Amit Schendel
Amit Schendel
Senior Security Researcher

Nov 25, 2026·9 min read·3 visits

Executive Summary (TL;DR)

Livewire PowerGrid 6.0.0 to 6.10.3 fails to sanitize the public sortDirection property before interpolating it into raw SQL ORDER BY clauses used by naturalSort. Setting sortField to an empty string bypasses Laravel's built-in direction validation, enabling SQL injection via standard Livewire update requests.

A SQL injection vulnerability exists in power-components/livewire-powergrid versions 6.0.0 through 6.10.3. The public Livewire component property sortDirection is interpolated directly into raw SQL ORDER BY clauses during natural sorting operations without prior validation. By clearing the sortField property to bypass standard Laravel query builder protections, an attacker can inject arbitrary SQL expressions via POST requests to the /livewire/update endpoint.

Vulnerability Overview

Livewire PowerGrid (power-components/livewire-powergrid) is a Composer package for the Laravel framework that constructs interactive data tables using Laravel Livewire. Livewire operates by exposing public properties on PHP component classes to the client browser. When user interactions occur in the frontend, the client transmits state synchronization requests via POST /livewire/update to hydrate and modify these public properties on the server.

In Livewire PowerGrid versions 6.0.0 through 6.10.3, the Sorting concern defines two public properties to manage column ordering: $sortField and $sortDirection. Because both properties are declared with public visibility and lack Livewire's #[Locked] attribute or lifecycle validation hooks, any client capable of interacting with the Livewire component can modify their values to arbitrary strings during a state update cycle.

When a PowerGrid table column is configured to use the naturalSort macro, the package generates a database-driver-specific raw SQL fragment containing a {sortDirection} placeholder. During query compilation, the ColumnRawQueries processing pipeline resolves this placeholder by reading the component's $sortDirection property and splicing it verbatim into an orderByRaw() method call.

This architecture results in a SQL injection vulnerability (CWE-89). By supplying a crafted $sortDirection payload alongside an empty $sortField string, an attacker can bypass Laravel's default query builder validation and execute arbitrary SQL subqueries or expressions within the context of the database connection.

Root Cause Analysis

The root cause of CVE-2026-65971 is the combination of unvalidated public property hydration in Livewire and an incomplete conditional check across sequential database query pipelines. Under normal circumstances, Laravel's Illuminate\Database\Query\Builder::orderBy() method prevents SQL injection in sort directions by validating that the direction string matches asc or desc, throwing an InvalidArgumentException otherwise. However, PowerGrid executes custom raw queries through an independent pipeline that does not enforce this constraint.

The vulnerability is introduced when a table column invokes the naturalSort macro defined in src/Providers/Macros.php. When enabled, this macro appends a query descriptor to the column's $rawQueries array specifying the orderByRaw method and a raw SQL string generated by Sql::sortStringAsNumber($this->dataField). Depending on the underlying database driver (MySQL, PostgreSQL, SQLite, or SQL Server), Sql::getSortSqlByDriver() returns a type-casting SQL expression terminated by the literal token {sortDirection}.

When PowerGrid processes the data source, it runs the query builder through a sequence of pipeline classes located in src/DataSource/Processors/Database/Pipelines/. The Sorting pipeline executes first, checking if (filled($this->component->sortField)) before invoking applySingleSort(), which in turn calls Laravel's validated $query->orderBy(). Immediately following this step, the ColumnRawQueries pipeline iterates over all configured columns and executes their $rawQueries descriptors regardless of whether $sortField is populated.

Inside ColumnRawQueries, the private method resolvePlaceholders() uses preg_replace_callback('/\{(\w+)\}/', ...) to dynamically fetch component properties via data_get($this->component, $property, ''). If $sortField is non-empty, the preceding Sorting pipeline triggers Laravel's orderBy() check and halts execution before ColumnRawQueries is reached. By setting sortField to an empty string (""), filled($this->component->sortField) evaluates to false, completely bypassing the Sorting pipeline and delivering the unsanitized $sortDirection string directly to $query->orderByRaw() in ColumnRawQueries.

Code Analysis

In vulnerable versions prior to 6.10.4, src/Concerns/Sorting.php exposed $sortDirection without lifecycle validation, and src/DataSource/Processors/Database/Pipelines/ColumnRawQueries.php interpolated any word matching {property} directly from the component instance into the raw SQL string.

// Vulnerable code in src/DataSource/Support/Sql.php (prior to 6.10.4)
private static function getSortSqlByDriver(string $driverName, string $version, string $sortField): string
{
    return match ($driverName) {
        'mysql' => match (true) {
            version_compare($version, '8.0.4', '>=') => "CAST(NULLIF(REGEXP_REPLACE($sortField, '[[:alpha:]]+', ''), '') AS SIGNED INTEGER) {sortDirection}",
            default => "CAST($sortField AS SIGNED INTEGER) {sortDirection}",
        },
        // Other drivers similarly terminate with {sortDirection}
    };
}
 
// Vulnerable placeholder resolution in src/DataSource/Processors/Database/Pipelines/ColumnRawQueries.php
private function resolvePlaceholders(?string $sql): ?string
{
    return preg_replace_callback('/\{(\w+)\}/', function ($matches) {
        $property = trim($matches[1]);
 
        // Vulnerable: directly returns arbitrary string from $this->component->sortDirection
        return data_get($this->component, $property, '');
    }, $sql);
}

Commit 13d047bf1637e82926e6914aa3ca0f29a4c9704a remediates the vulnerability by introducing a centralized static allowlist helper, Sql::sanitizeSortDirection(), and applying defense-in-depth sanitization across every ingestion point and query sink.

// Patched code in src/DataSource/Support/Sql.php
public static function sanitizeSortDirection(?string $direction): string
{
    // Normalize input by casting to string, trimming whitespace, and converting to lowercase
    $direction = strtolower(trim((string) $direction));
 
    // Enforce strict allowlist; default to 'asc' if input is invalid
    return in_array($direction, ['asc', 'desc'], true) ? $direction : 'asc';
}

The patch integrates Sql::sanitizeSortDirection() into the ColumnRawQueries placeholder resolver, the Sorting pipeline, state restoration in Persist, and the Livewire property lifecycle hook updatedSortDirection().

// Patched placeholder resolution in src/DataSource/Processors/Database/Pipelines/ColumnRawQueries.php
private function resolvePlaceholders(?string $sql): ?string
{
    return preg_replace_callback('/\{(\w+)\}/', function ($matches) {
        $property = trim($matches[1]);
 
        // Explicit intercept for sortDirection before raw SQL interpolation
        if ($property === 'sortDirection') {
            return Sql::sanitizeSortDirection($this->component->sortDirection);
        }
 
        return data_get($this->component, $property, '');
    }, $sql);
}
 
// Patched Livewire lifecycle hook in src/Concerns/Sorting.php
public function updatedSortDirection(): void
{
    // Sanitize immediately when Livewire hydrates updates from the client
    $this->sortDirection = Sql::sanitizeSortDirection($this->sortDirection);
 
    if ($this->hasLazyEnabled) {
        data_set($this->setUp, 'lazy.items', 0);
    }
}

> [!NOTE] > Fix Completeness Assessment: The patch is thorough with respect to sortDirection. By enforcing the 'asc' / 'desc' allowlist at the Livewire updatedSortDirection() hydration boundary, the Persist state loader, the Sorting callbacks, and the ColumnRawQueries sink, all avenues for injecting SQL via $sortDirection are neutralized. However, resolvePlaceholders() in ColumnRawQueries still permits generic {property} interpolation via data_get($this->component, $property, ''). While PowerGrid's built-in macros only embed {sortDirection}, developers writing custom column raw queries that reference other public component properties via {propertyName} syntax must ensure those properties are independently validated.

Exploitation

Exploiting CVE-2026-65971 requires network access to an application endpoint rendering a Livewire PowerGrid component where at least one column utilizes the naturalSort($when = true) macro. In typical Laravel deployments, PowerGrid tables are placed inside authenticated administrative or back-office views, requiring the attacker to possess a valid session (PR:L). If a table using naturalSort is rendered on a public page, exploitation requires no authentication (PR:N).

To trigger the injection, the attacker first loads the page containing the PowerGrid table to extract the initial Livewire component snapshot, checksum, and CSRF token (X-Livewire / X-CSRF-TOKEN). In Livewire v3, state updates are transmitted via a JSON POST request to /livewire/update. The payload contains an updates object specifying the properties to mutate on the backend component instance.

POST /livewire/update HTTP/1.1
Host: target.example.com
Content-Type: application/json
X-Livewire: true
 
{
  "_token": "valid_csrf_token_here",
  "components": [
    {
      "snapshot": "{\"data\":{\"sortField\":\"id\",\"sortDirection\":\"asc\",...},\"memo\":{...},\"checksum\":\"...\"}",
      "updates": {
        "sortField": "",
        "sortDirection": "asc, (SELECT CASE WHEN (1=1) THEN 1 ELSE (SELECT 1 UNION SELECT 2) END)"
      },
      "calls": []
    }
  ]
}

When the server processes this request, Livewire sets $component->sortField = "" and $component->sortDirection to the attacker's payload. The empty sortField bypasses src/DataSource/Processors/Database/Pipelines/Sorting.php. When ColumnRawQueries executes, the payload is appended directly to the driver's CAST(...) expression inside the ORDER BY clause:

SELECT * FROM `table_name` ORDER BY CAST(NULLIF(REGEXP_REPLACE(column_name, '[[:alpha:]]+', ''), '') AS SIGNED INTEGER) asc, (SELECT CASE WHEN (1=1) THEN 1 ELSE (SELECT 1 UNION SELECT 2) END) LIMIT 10 OFFSET 0

Because the injection occurs within an ORDER BY clause after a valid direction keyword (asc, ...), the attacker can append comma-separated column expressions. As documented in the public proof-of-concept (BiiTts/POC-CVE-2026-65971), attackers can leverage boolean-based blind extraction (altering row ordering or inducing subquery cardinality errors based on conditional checks), error-based extraction (using functions such as EXTRACTVALUE() or GTID_SUBSET() in MySQL), or time-based blind extraction (SLEEP()) to exfiltrate arbitrary records from the database.

Impact Assessment

CVE-2026-65971 is rated High severity with a CVSS v3.1 base score of 7.6 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L). The primary security impact is to confidentiality (C:H). Because the injected SQL executes with the privileges of the Laravel application's primary database connection, an attacker can read any table or view accessible to that database user. In standard Laravel schemas, this includes the users table (password hashes, email addresses, API tokens), session data, password reset tokens, and multi-tenant business records that the user's application-level role would otherwise restrict.

The integrity impact is rated Low (I:L). PHP's PDO driver for MySQL and PostgreSQL disables stacked queries by default within standard query execution methods used by Laravel's select() builder, preventing an attacker from simply appending ; DROP TABLE or ; UPDATE statements to the ORDER BY clause. However, depending on the database engine and configured privileges, side effects via invoked stored functions or file-writing primitives remain possible in specific configurations.

The availability impact is also rated Low (A:L). An attacker can inject computationally expensive expressions or time-delay functions (such as SLEEP() or BENCHMARK() in MySQL, or pg_sleep() in PostgreSQL) that execute per row evaluated during sorting. Repeated requests containing these payloads can exhaust PHP-FPM worker processes and database connection pools, resulting in localized denial of service.

From a threat intelligence perspective, CVE-2026-65971 is not currently listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. It holds an EPSS score of 0.00347 (20.73rd percentile), reflecting that exploitation requires the target application to specifically utilize the naturalSort macro on a PowerGrid component and typically requires low-privilege authentication.

Remediation

The primary remediation is to upgrade power-components/livewire-powergrid to version 6.10.4 or later. Version 6.10.4 introduces strict allowlist validation ensuring that $sortDirection can only ever resolve to 'asc' or 'desc' across all component lifecycle methods, persisted state loaders, and raw query interpolation pipelines.

composer require power-components/livewire-powergrid:^6.10.4

If an immediate package upgrade cannot be performed due to dependency constraints, application developers can implement a component-level workaround. By overriding the updatedSortDirection() Livewire lifecycle hook on individual table classes extending PowerGridComponent (or on a shared base component class), the application can intercept and sanitize the property immediately after Livewire hydrates the client payload and before the data source pipelines run.

namespace App\Livewire;
 
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
 
abstract class BasePowerGridComponent extends PowerGridComponent
{
    public function updatedSortDirection(): void
    {
        $direction = strtolower(trim((string) $this->sortDirection));
        $this->sortDirection = in_array($direction, ['asc', 'desc'], true) ? $direction : 'asc';
 
        parent::updatedSortDirection();
    }
}

> [!WARNING] > If your PowerGrid component enables state persistence for sorting ($this->persist(['sorting'])), overriding updatedSortDirection() alone is insufficient if the persisted state source (such as browser cookies) is untrusted, because state restoration bypasses the updated* hook. In such deployments, either upgrade to 6.10.4 or additionally sanitize $this->sortDirection inside the component's boot() or datasource() methods prior to query execution.

Security operations teams can monitor for exploitation attempts by inspecting HTTP POST bodies sent to /livewire/update. Any request containing a sortDirection value inside the updates JSON object that deviates from "asc" or "desc"—particularly when paired with "sortField": ""—is a strong indicator of an attack attempt.

Official Patches

Power-ComponentsOfficial GitHub Security Advisory (GHSA-7fgc-3h6c-698r)
Power-ComponentsFix commit implementing Sql::sanitizeSortDirection()
Power-ComponentsLivewire PowerGrid v6.10.4 Release

Fix Analysis (1)

Technical Appendix

CVSS Score
7.6/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L
EPSS Probability
0.35%
Top 79% most exploited

Affected Systems

power-components/livewire-powergrid (>= 6.0.0, < 6.10.4)

Affected Versions Detail

Product
Affected Versions
Fixed Version
livewire-powergrid
Power-Components
>= 6.0.0, < 6.10.46.10.4
AttributeDetail
Vulnerability TypeCWE-89: SQL Injection
CVSS v3.1 Score7.6 High (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:L)
Attack VectorNetwork via POST /livewire/update
Affected Versionspower-components/livewire-powergrid >= 6.0.0, < 6.10.4
Patched Version6.10.4
EPSS Score0.35% (20.73rd percentile)
Exploit StatusPublic PoC Available
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software 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.

Known Exploits & Detection

GitHubProof-of-concept, reproduction lab, and technical write-up for CVE-2026-65971 / GHSA-7fgc-3h6c-698r demonstrating SQL injection via the sortDirection Livewire property.

Vulnerability Timeline

Vulnerability patched in repository via commit 13d047bf1637e82926e6914aa3ca0f29a4c9704a and released in v6.10.4
2026-07-04
Public proof-of-concept and technical analysis published on GitHub by researcher Caio Fabrício (@BiiTts)
2026-07-23
GitHub Security Advisory GHSA-7fgc-3h6c-698r and CVE-2026-65971 officially published
2026-11-11
NVD and CVE records updated with CVSS v3.1 scoring metrics
2026-11-13

References & Sources

  • [1]GitHub Security Advisory GHSA-7fgc-3h6c-698r
  • [2]Fix Commit 13d047bf1637e82926e6914aa3ca0f29a4c9704a
  • [3]Livewire PowerGrid v6.10.4 Release Notes
  • [4]Comparison between v6.10.3 and v6.10.4
  • [5]NVD - CVE-2026-65971
  • [6]CVE.org Record - CVE-2026-65971
  • [7]PoC and Technical Write-up for CVE-2026-65971
  • [8]CWE-89: Improper Neutralization of Special Elements used in an SQL Command
  • [9]MITRE ATT&CK T1190: Exploit Public-Facing Application

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-65973
6.4

CVE-2026-65973: Local OS Command Injection in Laradocs KaTeX Server-Side Rendering

CVE-2026-65973 (GHSA-h746-qpxh-ph7g) is a local operating system command injection vulnerability (CWE-78) in the PeteBishwhip/laradocs package for Laravel. Versions from 0.4.0 to before 1.0.0 fail to sanitize or escape the configured Node.js binary path before passing it as part of a command string to PHP's proc_open() function during server-side KaTeX rendering. An attacker with the ability to modify local configuration files or environment variables can inject shell metacharacters to execute arbitrary OS commands under the privileges of the web server process.

Amit Schendel
Amit Schendel
2 views•9 min read
•about 3 hours ago•CVE-2026-68539
7.5

CVE-2026-68539: Unbounded Resource Consumption and Denial of Service in Fulgur CSS GCPM string-set Processing

CVE-2026-68539 is a remote Denial of Service (DoS) vulnerability in Fulgur, a Rust-based offline HTML/CSS-to-PDF rendering engine. Prior to version 0.29.0, the engine's CSS Generated Content for Paged Media (GCPM) implementation resolved and stored named strings via the string-set property without enforcing memory caps or caching DOM subtree text extraction. An unauthenticated attacker supplying crafted HTML and CSS to a rendering endpoint can trigger multi-gigabyte heap memory allocations and redundant O(M * L) subtree traversals, leading to CPU starvation and out-of-memory (OOM) process aborts.

Alon Barad
Alon Barad
4 views•10 min read
•about 6 hours ago•CVE-2026-64670
9.3

CVE-2026-64670: Stored Cross-Site Scripting in @waline/client Comment Editor Preview

A stored cross-site scripting (XSS) vulnerability in @waline/client allows unauthenticated attackers to execute arbitrary JavaScript in the context of an administrator's browser session. The flaw exists because the client-side markdown preview renderer utilizes the marked library without HTML sanitization and injects the resulting output directly into the DOM via Vue's v-html directive. When an administrator opens the edit interface for a comment, the preview element is mounted and evaluated immediately due to the combination of watchImmediate and v-show, leading to automatic payload execution and administrative token compromise.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 19 hours ago•CVE-2026-63304
8.1

CVE-2026-63304: OS Command Injection in WWBN AVideo via listFFmpegProcesses

WWBN AVideo versions through 29.0 contain an OS command injection vulnerability (CWE-78) in the standalone API utility function listFFmpegProcesses(). The function constructs a shell pipeline to monitor active FFmpeg processes by interpolating a user-controlled keyword parameter directly into a single-quoted grep argument without sanitization or shell escaping. An attacker capable of crafting or submitting a valid encrypted codeToExec payload can break out of the single-quoted argument context and execute arbitrary operating system commands with the privileges of the web server user.

Alon Barad
Alon Barad
5 views•9 min read
•about 20 hours ago•CVE-2026-59726
10.0

CVE-2026-59726: Unauthenticated Remote Code Execution in Ruflo MCP Bridge

Ruflo versions prior to 3.16.3 expose the Model Context Protocol (MCP) bridge HTTP endpoints (`POST /mcp` and `POST /mcp/:group`) on all network interfaces (`0.0.0.0:3001`) without authentication. Because the primary JSON-RPC tool dispatcher (`executeTool()`) bypasses existing tool blocklists, an unauthenticated network attacker can invoke the `terminal_execute` tool to achieve arbitrary command execution inside the bridge container. This initial access permits full exfiltration of third-party LLM provider API keys, unauthorized access to the co-located MongoDB instance, and manipulation of the AgentDB learning store.

Alon Barad
Alon Barad
13 views•2 min read
•about 21 hours ago•CVE-2026-59818
6.5

CVE-2026-59818: Improper Certificate Revocation List (CRL) Validation on Split gRPC Listeners in etcd

In etcd versions prior to 3.5.32 and 3.6.13, configuring the server with --listen-client-http-urls decouples HTTP and gRPC traffic onto distinct network listeners. Due to an implementation flaw in how TLS configurations are passed to the gRPC server instance, the Certificate Revocation List (CRL) defined by --client-crl-file is enforced exclusively on the HTTP listener and omitted entirely on the dedicated gRPC listener. This allows an adversary possessing a revoked, CA-signed client certificate to bypass mutual TLS (mTLS) revocation checks and authenticate directly to the gRPC interface.

Amit Schendel
Amit Schendel
6 views•10 min read