Skip to content
CVE-2026-105845 CrowdStrike LogScale · LogScale

Detect Payload CMS SQL Injection via SQLite/Postgres Adapter (CVE-2026-105845) in CrowdStrike LogScale

Detects exploitation attempts and post-exploitation signals for CVE-2026-105845, a critical (CVSS 9.8, CWE-89) SQL injection vulnerability in Payload CMS (npm package 'payload') affecting versions >= 3.0.0, < 3.88.0 and >= 4.0.0-canary.0, < 4.0.0-canary.27. An untrusted user who can query readable collections through dynamic filters or joins can submit a request that causes SQL injection in the SQLite and Postgres adapters. The issue is fixed in 3.88.0 and 4.0.0-canary.27. Detection focuses on SQL metacharacters and injection tokens appearing in Payload API request parameters, anomalous database errors, and outbound Node.js process behaviour consistent with injection.

MITRE ATT&CK

Tactic
Initial Access Collection Credential Access

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// df00tech DF00-7174c825e6 · https://df00tech.com/detections/CVE-2026-105845 · licence: https://df00tech.com/detections/licence
#event_simpleName=/HttpRequest|DnsRequest/ OR #repo="web_logs"
| url := lower(url)
| case {
    url=/\/api\/|\/graphql/ | *;
    * | drop
  }
| regex("(?i)(union\\s+select|'\\s*or\\s*'|--|/\\*|pg_sleep\\(|information_schema|sqlite_master|xp_cmdshell|waitfor\\s+delay)", field=url)
| groupBy([src_ip, http_method], function=[count(as=attempts), collect([url])])
| attempts >= 1
| sort(attempts, order=desc)
high severity medium confidence

CrowdStrike LogScale/CQL query over web request or HTTP telemetry matching Payload CMS API/GraphQL requests containing SQL-injection signatures.

Data Sources

Web Server LogsFalcon LogScale HTTP telemetry

Required Tables

web_logsHttpRequest

False Positives & Tuning

  • Content with SQL-like text saved via the API.
  • Scanner and pentest traffic.
  • Legitimate complex filter queries using 'or' and comparison operators.

Other platforms for CVE-2026-105845


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.

  1. Test 1 Boolean-based SQLi probe via Payload REST 'where' operator

    Expected signal: Web server / proxy access log entry for GET /api/posts with a URL-decoded query string containing "' OR '1'='1".

  2. Test 2 UNION-based SQLi attempt via GraphQL variable

    Expected signal: POST /api/graphql access log and application/DB log showing a UNION SELECT token reaching the SQLite/Postgres adapter.

  3. Test 3 Time-based blind SQLi with pg_sleep

    Expected signal: Access log with pg_sleep( in the decoded query string and a correspondingly delayed response time; Postgres log showing the sleep query.


Response Playbook

Triage

  1. Identify the Payload CMS instance targeted and confirm its version: inspect package.json / package-lock.json or `npm ls payload`. Versions >= 3.0.0 < 3.88.0 and >= 4.0.0-canary.0 < 4.0.0-canary.27 are vulnerable.
  2. Extract and URL-decode the full offending request(s) from the alert. Determine which parameter carried the injection (REST 'where'/'sort' operators, GraphQL variables, or nested field operators) and whether the payload is a probe (boolean/UNION) or data-exfiltration attempt.
  3. Correlate the source IP against authentication logs and prior activity to determine if the request was authenticated, from a known scanner, or from an unexpected origin; check response status codes and sizes for signs of successful data return (large/200 responses vs 500 DB errors).
  4. Review database (Postgres/SQLite) logs for the same time window for malformed queries, syntax errors, or unexpectedly expensive queries tied to the request.

Containment

  1. Apply the fix immediately: upgrade Payload to >= 3.88.0 (or >= 4.0.0-canary.27 on the canary line); the fix is commit a742140ab4fca3160f7f83e9e7d996552ffc3b5a.
  2. If patching cannot be done immediately, place a WAF/reverse-proxy rule in front of the Node.js app blocking SQL-injection tokens in 'where'/'sort' query parameters on /api/ and /graphql, and restrict the API to authenticated/trusted networks.
  3. Rotate database credentials and any secrets reachable by the application DB user if exploitation is confirmed, and revoke sessions/API keys associated with the attacking requests.

Evidence Collection

  1. Preserve raw web server / reverse-proxy / WAF access logs covering the attack window, including full query strings and request bodies, plus Postgres/SQLite query logs.
  2. Capture the running Payload version artifacts (package-lock.json, deployed node_modules/payload/package.json) and container image digest to document exposure.
  3. Snapshot the database and relevant tables to establish whether data was read or modified, and export application logs showing the executed queries.

Escalation Criteria

  • !Escalate to incident response if responses indicate successful data retrieval (UNION-based output, boolean/time-based confirmation, or large anomalous 200 responses) or if sensitive tables (users, credentials, tokens) were queried.
  • !Escalate if the vulnerable version is confirmed internet-exposed and unauthenticated access to the API is possible, given the CVSS 9.8 rating.
  • !Escalate to data-protection/legal if PII or credential data may have been exfiltrated via the injection.

Investigation Guide

Forensic Artifacts

  • >Web server / reverse-proxy / WAF access logs with URL-decoded query strings showing injection tokens in 'where'/'sort' parameters.
  • >Postgres/SQLite server logs showing anomalous or malformed SQL and unusually expensive queries.
  • >Payload application (Node.js) logs and stack traces referencing the SQLite/Postgres adapter, plus package-lock.json documenting the installed version.

Tuning Guidance

Baseline legitimate Payload 'where'/'sort' usage for your application: many apps legitimately send 'or' operators and comparison tokens, so prefer high-signal patterns (UNION SELECT, pg_sleep, sqlite_master, information_schema, stacked '; DROP') over broad metacharacters to reduce noise. Allowlist known scanners and CI/CD test runners by source IP, and exclude rich-text/code-snippet fields known to contain SQL-like content. Once Payload is confirmed patched to >= 3.88.0 across all instances, lower severity or scope the rule to residual probing detection rather than active-exploitation response.


Hunting Queries

Hunt across historical web logs for Payload CMS API/GraphQL requests whose decoded query strings carry SQL-injection signatures, to identify prior probing or exploitation before the alert window.

Hunting — KQL
kql
// df00tech DF00-7174c825e6 · https://df00tech.com/detections/CVE-2026-105845 · licence: https://df00tech.com/detections/licence
W3CIISLog | extend q = url_decode(csUriQuery) | where csUriStem has_any ("/api/", "/graphql") | where q has_any ("union select","pg_sleep(","sqlite_master","information_schema","' or '","--") | project TimeGenerated, cIP, csUriStem, q, scStatus | order by TimeGenerated desc
Hunting — SPL
spl
``` df00tech DF00-7174c825e6 · https://df00tech.com/detections/CVE-2026-105845 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="*/api/*" OR uri_path="*/graphql*") | eval q=urldecode(uri_query) | search q="*union select*" OR q="*pg_sleep(*" OR q="*sqlite_master*" OR q="*information_schema*" OR q="*' or '*" | table _time src_ip uri_path q status

Atomic Red Team Tests

Test 1 Boolean-based SQLi probe via Payload REST 'where' operator
linux

Sends a REST API request with a SQL-injection payload in a 'where' field operator against a lab Payload CMS instance to confirm the detection fires on API query strings.

Command

bash
curl -s -G 'http://localhost:3000/api/posts' --data-urlencode "where[title][equals]=x' OR '1'='1" -o /tmp/payload_sqli_probe.out

Cleanup

bash
rm -f /tmp/payload_sqli_probe.out

Expected Telemetry

Web server / proxy access log entry for GET /api/posts with a URL-decoded query string containing "' OR '1'='1".

Expected Detection

KQL/SPL/EQL rules match on the SQL-injection token within the /api/ request query string.

Test 2 UNION-based SQLi attempt via GraphQL variable
linux

Issues a GraphQL query whose variable carries a UNION SELECT payload against a lab Payload instance to validate GraphQL-path detection.

Command

bash
curl -s -X POST 'http://localhost:3000/api/graphql' -H 'Content-Type: application/json' --data '{"query":"query($w:String){Posts(where:{title:{equals:$w}}){docs{id}}}","variables":{"w":"x UNION SELECT username,password FROM users--"}}' -o /tmp/payload_sqli_union.out

Cleanup

bash
rm -f /tmp/payload_sqli_union.out

Expected Telemetry

POST /api/graphql access log and application/DB log showing a UNION SELECT token reaching the SQLite/Postgres adapter.

Expected Detection

Detection matches on 'union select' and 'graphql' indicators in web/HTTP telemetry.

Test 3 Time-based blind SQLi with pg_sleep
linux

Sends a time-based blind injection using pg_sleep via the 'where' operator to a lab Payload instance backed by Postgres, confirming detection of time-based payloads.

Command

bash
curl -s -G 'http://localhost:3000/api/posts' --data-urlencode "where[title][like]=x');SELECT pg_sleep(5)--" -o /tmp/payload_sqli_time.out

Cleanup

bash
rm -f /tmp/payload_sqli_time.out

Expected Telemetry

Access log with pg_sleep( in the decoded query string and a correspondingly delayed response time; Postgres log showing the sleep query.

Expected Detection

Detection matches on 'pg_sleep(' and stacked-query tokens in the request.

Related Detections