Detect Drupal Core Remote Code Execution (CVE-2026-132165) in IBM QRadar
Detects exploitation attempts and post-exploitation activity associated with CVE-2026-132165, a remote code execution vulnerability in Drupal Core (SA-CORE-2026-017, CWE-636), rated highly critical. The flaw is in the install.php installer. Under specific conditions an attacker can use the installer to attempt to reinstall Drupal, which can lead to site takeover or remote code execution. Some exploit paths are mitigated if the web server cannot write to or change permissions on settings.php. The Drupal Security Team reports exploitation on live sites as early as 2026-11-19, and the flaw is listed in the CISA KEV catalog. Detection focuses on anomalous POST requests to Drupal endpoints, web server processes spawning shell or interpreter children, suspicious PHP file writes into the webroot, and outbound connections from the Drupal process. Correlate with patch state against SA-CORE-2026-017.
MITRE ATT&CK
- Tactic
- Initial Access Execution
QRadar Detection Query
-- df00tech DF00-85d1a39132 · https://df00tech.com/detections/CVE-2026-132165 · licence: https://df00tech.com/detections/licence
SELECT sourceip, destinationip, "URL", "Request Method", "HTTP Response Code", username, QIDNAME(qid) AS event_name
FROM events
WHERE LOGSOURCETYPENAME(devicetype) IN ('Apache HTTP Server', 'Microsoft IIS', 'NGINX')
AND "Request Method" = 'POST'
AND ("URL" ILIKE '%/node%' OR "URL" ILIKE '%/user%' OR "URL" ILIKE '%/admin%' OR "URL" ILIKE '%index.php%' OR "URL" ILIKE '%/core/%')
AND ("URL" ILIKE '%php://%' OR "URL" ILIKE '%base64_decode%' OR "URL" ILIKE '%system(%' OR "URL" ILIKE '%O:8:%' OR "URL" ILIKE '%__destruct%' OR "URL" ILIKE '%phar://%')
AND "HTTP Response Code" NOT IN ('404', '301', '302')
ORDER BY "startTime" DESC LAST 24 HOURS Returns POST requests to Drupal endpoints with PHP code-execution markers in the URL, for investigation of CVE-2026-132165.
Data Sources
Required Tables
False Positives & Tuning
- Authorized penetration testing engagements
- Security scanners enumerating Drupal attack surface
- Normalized WAF alert replays appearing as POST events
Other platforms for CVE-2026-132165
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 Simulated Drupal RCE POST with PHP code-execution payload
Expected signal: Web server access log records a POST to /node/1 with PHP code-execution tokens in the body and a non-404 status.
- Test 2 Web server process spawns shell (post-exploitation)
Expected signal: EDR records apache2/php-fpm (or a bash child under www-data) spawning id/whoami/curl.
- Test 3 PHP webshell dropped into Drupal webroot
Expected signal: File-creation event for shell.php under sites/default/files owned by the web server user.
References (4)
Response Playbook
Triage
- Confirm the targeted host runs Drupal Core and check its version against SA-CORE-2026-017; flag any version not yet patched.
- Review the full HTTP request (method, URI, body, headers) for code-execution markers and determine whether the server returned a 200/500 indicating processing. Check for requests to the installer at install.php.
- Pivot on the source IP to see whether it hit other Drupal endpoints, appears in threat intel, or is a known scanner.
- Inspect the web server process tree on the host for child shells, interpreters, or recon commands spawned within minutes of the request.
Containment
- Block the offending source IP(s) at the WAF/firewall and apply a virtual patch / WAF rule for the SA-CORE-2026-017 payload pattern.
- Isolate the affected Drupal host from the network if post-exploitation (webshell, shell spawn, outbound C2) is confirmed.
- Apply the Drupal Core security update from SA-CORE-2026-017, secure the installer after installation, and rotate any secrets (DB credentials, API keys, Drupal hash salt) exposed to the webroot.
Evidence Collection
- Preserve web server access and error logs, PHP-FPM logs, and the raw request body for the exploitation window.
- Capture a disk/image or at minimum the Drupal webroot (especially sites/default/files and any newly written .php files) and the process-execution timeline.
- Export EDR process, network, and file-write telemetry for the web server account around the event time.
Escalation Criteria
- !Escalate to IR if a web server process spawned a shell/interpreter or a new PHP file appeared in the webroot after the request.
- !Escalate if outbound connections to unknown hosts originate from the Drupal process or if credential/data access is observed following the request.
Investigation Guide
Forensic Artifacts
- >
New or modified .php files under the Drupal webroot (sites/default/files, modules, themes) with recent timestamps. - >
Web server / PHP-FPM access and error log entries showing the exploit POST and subsequent 200/500 responses. - >
Shell history, cron entries, or outbound network connections created by the www-data/apache user.
Tuning Guidance
Baseline known-good scanner and monitoring source IPs and exclude them to reduce noise. Tighten the payload token list if admin configuration imports legitimately carry serialized data in your environment, and prioritize alerts where the web server process subsequently spawns a shell or writes a new .php file, which converts a probe into confirmed compromise. Scope path lists to your actual Drupal base path (e.g., /web/ for composer-based installs).
Hunting Queries
Hunt for Drupal POST requests containing PHP code-execution markers across web logs to surface additional exploitation attempts of CVE-2026-132165.
// df00tech DF00-85d1a39132 · https://df00tech.com/detections/CVE-2026-132165 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csMethod == "POST" and csUriStem has_any (dynamic(["/node","/user","/core/","/index.php"])) | where tolower(csUriQuery) has_any (dynamic(["o:8:","__destruct","phar://","base64_decode"])) | summarize count() by cIP, csUriStem, bin(TimeGenerated, 1h) ``` df00tech DF00-85d1a39132 · https://df00tech.com/detections/CVE-2026-132165 · licence: https://df00tech.com/detections/licence ```
index=web method=POST (uri_path="*/node*" OR uri_path="*index.php*") | where match(lower(uri_query), "o:8:|__destruct|phar:\/\/|base64_decode") | stats count by src_ip, uri_path Atomic Red Team Tests
Sends a crafted POST request to a lab Drupal node endpoint containing a PHP code-execution marker to validate web-log detection.
Command
curl -s -X POST 'http://drupal.lab.local/node/1' --data 'form_id=test&value=O:8:"stdClass":1:{s:3:"cmd";s:6:"__destruct";}phar://payload' -A 'sqlmap/1.7' Cleanup
echo 'No cleanup required; remove the test request entry from lab web logs if desired.' Expected Telemetry
Web server access log records a POST to /node/1 with PHP code-execution tokens in the body and a non-404 status.
Expected Detection
The kql/spl/qradar_aql/sumo_logic/chronicle_yaral web-log rules fire on the PHP payload tokens.
Simulates a PHP/web server process executing a shell command, mimicking successful RCE after CVE-2026-132165 exploitation.
Command
sudo -u www-data bash -c 'id; whoami; curl -s http://127.0.0.1/ >/dev/null' Cleanup
echo 'No persistent changes made.' Expected Telemetry
EDR records apache2/php-fpm (or a bash child under www-data) spawning id/whoami/curl.
Expected Detection
The elastic_eql and crowdstrike_cql rules detect the web/PHP server process spawning a shell or recon utility.
Writes a minimal PHP webshell into the Drupal files directory to validate file-write forensic hunting.
Command
echo '<?php system($_GET["c"]); ?>' | sudo tee /var/www/html/sites/default/files/shell.php Cleanup
sudo rm -f /var/www/html/sites/default/files/shell.php Expected Telemetry
File-creation event for shell.php under sites/default/files owned by the web server user.
Expected Detection
Forensic-artifact hunting for new .php files in the webroot surfaces the dropped webshell.