Back to Intelligence

Critical Drupal Unauthenticated RCE Patch Released — Detection and Emergency Remediation Guide

SA
Security Arsenal Team
November 19, 2026
14 min read

Introduction

The Drupal Security Team has released an emergency security update addressing a critical, unauthenticated remote code execution (RCE) vulnerability in the Drupal content management platform. The vulnerability allows a remote attacker — with no credentials and no prior access — to execute arbitrary code on the underlying server, which in practical terms means full site takeover: webshell deployment, database theft, lateral movement into the internal network, and persistence that survives a CMS-level cleanup.

What elevates this from a routine patch advisory to an operational emergency is the explicit warning accompanying the release: exploit code is expected to surface quickly. That phrasing from a vendor security team is not boilerplate. It reflects an assessment that the vulnerability is sufficiently straightforward to reverse-engineer from the patch itself, and that threat actors — including the automated scanning crews that weaponize CMS flaws within hours of disclosure — are already diffing the release.

Drupal powers a significant share of government, higher education, healthcare, and enterprise web properties worldwide. If your organization operates any public-facing Drupal site, treat this as a patch-now event, not a patch-this-quarter event. This post breaks down what we know, how to hunt for exploitation that may have already occurred, and how to remediate and harden.

Technical Analysis

What Was Disclosed

Per the reporting and the Drupal Security Team's advisory:

  • Vulnerability class: Unauthenticated remote code execution
  • Severity: Critical (per the Drupal Security Team's risk assessment model, this sits at the top of the scale — remotely exploitable, no authentication required, no user interaction needed)
  • Impact: Full compromise of the affected site, including arbitrary PHP execution in the context of the web server process, read/write access to the Drupal database, and the ability to modify or destroy site content and configuration
  • Attack vector: Network-based, over standard HTTP/HTTPS to the public-facing application — meaning any internet-reachable Drupal instance is in scope
  • Exploitation forecast: The vendor explicitly warned that exploits may surface quickly, which historically for critical Drupal flaws has meant working exploit code and mass scanning within 24–72 hours of disclosure

Drupal's security risk rating system weighs exploitability, privilege requirements, and impact. A critical unauthenticated RCE rating is reserved for flaws where an anonymous internet user can compromise the site with a single crafted request or a short request sequence. This is the same severity class as the Drupalgeddon-family vulnerabilities that were mass-exploited within hours of disclosure and remained a favorite of cryptojacking crews and initial access brokers for years afterward.

Why "Exploits May Surface Quickly" Matters

When a CMS vendor ships a security release, the patch itself is a roadmap. The diff between the vulnerable and fixed code tells a competent reverse engineer exactly where the flaw lives, what input reaches it, and what a working exploit payload needs to look like. For a widely deployed open-source platform like Drupal:

  1. Patch diffing begins immediately. Automated tooling and manual researchers pull the new release, compare it against the prior version, and isolate the security-relevant changes within hours.
  2. Public proof-of-concept follows. For critical unauthenticated RCE in a major CMS, a functional PoC typically appears publicly within days — sometimes within the same day.
  3. Mass scanning and opportunistic exploitation follow the PoC. Botnets and initial access brokers scan the internet for version fingerprints and vulnerable endpoints. Unpatched sites are compromised in bulk, typically receiving webshells, SEO spam injectors, cryptominers, or access that is later resold to ransomware affiliates.

The defensive implication: your exposure window is measured in hours, not weeks. If you cannot patch immediately, you need compensating controls in place before the PoC drops — not after.

Exploitation Chain — Defender's View

While full technical details of the flaw are being held back to slow weaponization, the observable exploitation pattern for this class of Drupal RCE is well understood and is what your detections should target:

  1. Reconnaissance: Attackers fingerprint Drupal installations via /CHANGELOG.txt, /core/CHANGELOG.txt, X-Generator HTTP headers, and known asset paths to identify unpatched versions.
  2. Delivery: A crafted HTTP request (GET or POST, frequently to a form, AJAX callback, or route handler in the affected component) triggers the code execution primitive.
  3. Execution: Attacker-controlled PHP executes as the web server user (www-data, apache, nginx). The classic first-stage payload writes a webshell into a web-accessible directory — /sites/default/files/ is the canonical Drupal target because it must be web-accessible and writable by the application.
  4. Post-exploitation: The webshell is used for command execution (whoami, id, uname -a), downloading second-stage tooling via curl/wget, enumerating the database credentials from settings.php, creating rogue admin users in the users_field_data table, and establishing persistence via cron or injected PHP in theme/module files.

Every one of those steps leaves forensic residue. The detection content below targets exactly these behaviors.

Exploitation Status

At the time of the advisory's publication, no confirmed in-the-wild exploitation had been publicly reported — but the vendor's own warning makes clear this is a race condition. Defenders should operate under the assumption that scanning and exploit attempts begin within 24–72 hours of patch release and that any site left unpatched past that window has likely been probed at minimum. Sites running end-of-life Drupal branches (Drupal 7, and older unsupported minor branches of current major versions) face the additional risk that no fix may be available for them at all.

Detection & Response

The highest-fidelity detections for this threat class are behavioral: web server processes spawning shells, PHP files appearing in upload directories, and anomalous requests to Drupal endpoints. Tune the paths to your environment before deployment.

YAML
---
title: Web Server Process Spawning Shell or Reconnaissance Command - Drupal RCE
description: Detects Apache, Nginx, or PHP-FPM worker processes spawning command shells or common post-exploitation reconnaissance binaries, consistent with webshell activity following exploitation of a CMS RCE vulnerability such as the critical Drupal flaw. Web server workers should essentially never spawn interactive shells in production.
references:
  - https://www.bleepingcomputer.com/news/security/drupal-patches-critical-rce-flaw-warns-exploits-may-surface-quickly/
  - https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/02/13
status: experimental
id: 3f9c1a72-8b4d-4e6a-9c21-7d5e2f8a1b34
tags:
  - attack.persistence
  - attack.t1505.003
  - attack.execution
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/apache2'
      - '/httpd'
      - '/nginx'
      - '/php-fpm'
      - '/php-cgi'
  selection_child_img:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/python'
      - '/python3'
      - '/perl'
  selection_child_cmd:
    CommandLine|contains:
      - 'whoami'
      - '/etc/passwd'
      - 'uname -a'
      - 'curl '
      - 'wget '
      - 'base64 -d'
      - 'nc -e'
      - 'ncat '
  condition: selection_parent and 1 of selection_child_*
falsepositives:
  - Legitimate Drupal modules invoking external tools (image processing, PDF generation) — investigate and whitelist by full command line, never by parent process alone
level: high
---
title: PHP File Created in Drupal Uploads or Files Directory - Potential Webshell Drop
description: Detects creation of PHP files in Drupal's web-accessible files and upload directories. The sites/default/files path must be writable by the web application and is the canonical webshell drop location following Drupal RCE exploitation. Legitimate PHP execution from these paths should be blocked at the web server level.
references:
  - https://www.bleepingcomputer.com/news/security/drupal-patches-critical-rce-flaw-warns-exploits-may-surface-quickly/
  - https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/02/13
status: experimental
id: 8d2e5b41-6c3f-4a9b-b7e4-1f9a3c6d2e58
tags:
  - attack.persistence
  - attack.t1505.003
logsource:
  category: file_event
  product: linux
detection:
  selection:
    TargetFilename|contains:
      - '/sites/default/files/'
      - '/sites/*/files/'
      - '/files/'
    TargetFilename|endswith:
      - '.php'
      - '.phtml'
      - '.phar'
      - '.php5'
      - '.php7'
falsepositives:
  - Rare — some poorly written contrib modules write PHP to files directories; verify authorship and content before whitelisting
level: critical
---
title: Suspicious Encoded or Serialized Payload in HTTP Request to Drupal Endpoint
description: Detects inbound web requests to Drupal paths containing PHP serialization markers, base64-encoded blobs, or common RCE probe strings in query parameters or POST bodies. High volume of such requests against a single host may indicate active exploitation attempts or vulnerability scanning following public disclosure.
references:
  - https://www.bleepingcomputer.com/news/security/drupal-patches-critical-rce-flaw-warns-exploits-may-surface-quickly/
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/02/13
status: experimental
id: 5a1c7e93-2d8b-4f6c-a3d9-9e2b4f7c1a65
tags:
  - attack.initial_access
  - attack.t1190
logsource:
  category: webserver
detection:
  selection_uri:
    cs-uri-query|contains:
      - 'base64_decode'
      - 'eval('
      - 'system('
      - 'passthru('
      - 'shell_exec('
      - 'assert('
      - 'O:8:'
      - 'php://input'
      - 'data://text/plain'
  filter_paths:
    cs-uri-stem|contains:
      - '/sites/default/files/js/'
      - '/sites/default/files/css/'
      - '/misc/'
      - '/themes/'
  condition: selection_uri and not filter_paths
falsepositives:
  - WAF/security scanner traffic from authorized testing — correlate source IPs against known scanner ranges
level: medium
KQL — Microsoft Sentinel / Defender
// Hunt: Web server / PHP worker processes spawning shells or recon commands (last 7 days)
// Requires Syslog or CEF ingestion of Linux auditd/process events into Sentinel
Syslog
| where TimeGenerated > ago(7d)
| where ProcessName in~ ("sh", "bash", "dash", "python", "python3", "perl", "curl", "wget", "nc", "ncat")
| where SyslogMessage has_any ("www-data", "apache", "nginx", "php-fpm")
   or SyslogMessage has_any ("whoami", "uname -a", "/etc/passwd", "base64 -d", "nc -e")
| extend HostIP = HostIP, Computer = Computer
| summarize FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated),
            Commands = make_set(SyslogMessage, 20) by Computer, ProcessName
| order by FirstSeen desc;

// Hunt: New PHP files written under Drupal files directories (webshell staging)
// Requires file integrity monitoring (FIM) or auditd file watches forwarding to Sentinel
Syslog
| where TimeGenerated > ago(7d)
| where SyslogMessage has_any ("/sites/default/files/", "/sites/")
| where SyslogMessage has_any (".php", ".phtml", ".phar")
| where SyslogMessage has_any ("CREATE", "write", "open", "rename")
| project TimeGenerated, Computer, ProcessName, SyslogMessage
| order by TimeGenerated desc;

// Hunt: Inbound exploitation probes against Drupal (encoded/serialized payloads)
// Requires WAF, reverse proxy, or web server logs ingested via CommonSecurityLog
CommonSecurityLog
| where TimeGenerated > ago(3d)
| where DeviceProduct has_any ("Apache", "Nginx", "WAF", "ModSecurity")
| where RequestURL has_any ("base64_decode", "eval(", "system(", "passthru(", "shell_exec(", "php://input", "data://text/plain")
    or AdditionalExtensions has_any ("base64_decode", "eval(", "php://input")
| summarize AttemptCount = count(), Targets = make_set(DestinationHostName, 10),
            URLs = make_set(RequestURL, 10) by SourceIP, bin(TimeGenerated, 1h)
| where AttemptCount > 5
| order by AttemptCount desc;
VQL — Velociraptor
-- Velociraptor hunt: identify post-exploitation artifacts on Drupal web servers
-- Run across your web tier after patch deployment to catch compromise that preceded patching

-- 1) Web server processes with suspicious children (webshell command execution)
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE (Username =~ 'www-data|apache|nginx|http')
  AND (Name =~ '^(sh|bash|dash|python|python3|perl|nc|ncat|curl|wget)$'
       OR CommandLine =~ 'whoami|uname -a|/etc/passwd|base64 -d|nc -e')

-- 2) Recently created or modified PHP files in Drupal files/upload directories (webshell staging)
-- Adjust the webroot glob to your deployment path
SELECT FullPath, Size, Mtime, Ctime, Atime
FROM glob(globs='/var/www/**/sites/*/files/**/*.php',
          accessor='file')
WHERE Mtime > (now() - 604800)
ORDER BY Mtime DESC

-- 3) Established outbound connections from the web server user (C2 / tooling download)
SELECT Pid, Name, Status, LocalAddress, RemoteAddress, CommandLine
FROM netstat()
WHERE Status =~ 'ESTABLISHED'
  AND (Name =~ 'apache|httpd|nginx|php-fpm|sh|bash|python|perl')
  AND NOT RemoteAddress =~ '^(10\\.|172\\.(1[6-9]|2[0-9]|3[0-1])\\.|192\\.168\\.|127\\.)'
Bash / Shell
#!/bin/bash
# Drupal Critical RCE — Emergency Triage, Verification, and Hardening Script
# Run on each Drupal web server. Test in staging before production use.
set -euo pipefail

WEBROOT="/var/www/html"   # Adjust to your Drupal docroot
REPORT="/tmp/drupal_rce_triage_$(date +%Y%m%d_%H%M%S).txt"

echo "=== Drupal Emergency RCE Triage — $(hostname) — $(date -u) ===" | tee "$REPORT"

# ---- 1) Identify Drupal core version (verify against the security advisory) ----
echo -e "\n[+] Drupal core version:" | tee -a "$REPORT"
if [ -f "$WEBROOT/core/lib/Drupal.php" ]; then
  grep -E "const VERSION" "$WEBROOT/core/lib/Drupal.php" | tee -a "$REPORT"
fi
if command -v drush &>/dev/null; then
  (cd "$WEBROOT" && drush status --fields=drupal-version 2>/dev/null) | tee -a "$REPORT" || true
fi

# ---- 2) Pull pending security updates list via composer/drush ----
echo -e "\n[+] Available security updates:" | tee -a "$REPORT"
(cd "$WEBROOT" && composer audit --no-interaction 2>/dev/null) | tee -a "$REPORT" || echo "composer audit unavailable" | tee -a "$REPORT"

# ---- 3) Hunt for webshells: PHP files in files/ dirs modified in last 14 days ----
echo -e "\n[+] Suspicious PHP files under files directories (last 14 days):" | tee -a "$REPORT"
find "$WEBROOT" -type d -name "files" -path "*/sites/*" 2>/dev/null | while read -r d; do
  find "$d" -type f \( -name "*.php" -o -name "*.phtml" -o -name "*.phar" \) -mtime -14 -ls 2>/dev/null
done | tee -a "$REPORT"

# ---- 4) Flag recently modified core/theme/module PHP files (possible backdoor injection) ----
echo -e "\n[+] PHP files modified in last 7 days outside expected deploy windows:" | tee -a "$REPORT"
find "$WEBROOT" -type f -name "*.php" -mtime -7 2>/dev/null | grep -vE "/(vendor|node_modules)/" | tee -a "$REPORT"

# ---- 5) Check for rogue admin users (uid or roles=administrator) ----
echo -e "\n[+] Drupal administrator accounts (verify each is authorized):" | tee -a "$REPORT"
if command -v drush &>/dev/null; then
  (cd "$WEBROOT" && drush user:list --roles=administrator 2>/dev/null) | tee -a "$REPORT" || true
fi

# ---- 6) Web server child processes (active webshell command execution) ----
echo -e "\n[+] Shells/tools running under web server user:" | tee -a "$REPORT"
ps -eo user,pid,ppid,comm,args | grep -E "^(www-data|apache|nginx)" | grep -E "(sh|bash|dash|python|perl|nc|curl|wget)" | grep -v grep | tee -a "$REPORT" || true

# ---- 7) Cron-based persistence ----
echo -e "\n[+] Cron entries for web server user:" | tee -a "$REPORT"
crontab -u www-data -l 2>/dev/null | tee -a "$REPORT" || echo "no crontab for www-data" | tee -a "$REPORT"

# ---- 8) EMERGENCY COMPENSATING CONTROL: block PHP execution in files dirs ----
echo -e "\n[+] Recommended Apache/.htaccess hardening for files directories:"
cat <<'EOF' | tee -a "$REPORT"
# Place in sites/default/files/.htaccess (and every sites/*/files/ directory)
php_flag engine off
<FilesMatch "\.(php|phtml|phar|php5|php7)$">
  Require all denied
</FilesMatch>
# Nginx equivalent:
# location ~* ^/sites/.*/files/.*\.(php|phtml|phar)$ { deny all; }
EOF

echo -e "\n=== Triage complete. Review $REPORT, then: ==="
echo "1. PATCH NOW: composer update 'drupal/core-*' --with-all-dependencies"
echo "2. If evidence of compromise exists: isolate the host, snapshot for forensics, rebuild from known-good"
echo "3. Rotate all secrets: settings.php DB creds, API keys, Drupal hash salt, admin passwords"
echo "4. Assume any unpatched internet-facing instance has been probed — hunt before you trust"

Remediation

1. Patch immediately — this is the only complete fix. Apply the security release published by the Drupal Security Team to every Drupal instance in your estate, including staging and development environments that are network-reachable. Update via Composer (composer update 'drupal/core-*' --with-all-dependencies followed by database updates via drush updatedb or /update.php), and verify the running version matches the fixed release listed in the official advisory at drupal.org/security. Do not rely on your CDN or WAF vendor's assurance alone — verify the version on the origin.

2. Treat end-of-life branches as urgent migration candidates. Unsupported Drupal versions do not receive security fixes. Any Drupal 7 site or unsupported minor branch exposed to the internet is a standing liability; if a fix is not available for your branch, take the site offline, place it behind authenticated access, or migrate to a supported release immediately.

3. Deploy compensating controls where patching is delayed. At minimum: block PHP execution in all sites/*/files/ directories at the web server layer (Apache php_flag engine off plus a FilesMatch deny; Nginx location block denying *.php under files paths). This single control neutralizes the most common webshell staging location for this entire class of Drupal exploitation. Add WAF rules inspecting request bodies and query strings for PHP function names, serialization markers, and php:// / data:// wrappers.

4. Hunt before you declare yourself clean. If your site was internet-facing and unpatched after disclosure, patching alone does not remove an attacker who got in first. Run the detection content above, review web server access logs for the 72 hours preceding your patch for anomalous POSTs and encoded payloads, audit the Drupal user list for unauthorized administrator accounts, and diff the codebase against a clean copy of your deployed version (e.g., via drush pm:security for modules and a git status / checksum comparison for core).

5. If you find evidence of compromise, escalate to full IR. A CMS RCE compromise is a server compromise, not a website defacement. Rotate every secret the web server could reach — database credentials in settings.php, the Drupal hash salt, API keys, SMTP credentials, and any service accounts. Rebuild the host from a known-good image and restore content from a backup predating the earliest suspicious log entry. Engage your IR retainer if you cannot confidently scope the intrusion.

6. Close the loop operationally. Add Drupal core and contrib module versions to your continuous vulnerability scanning inventory, subscribe to the Drupal Security Team's mailing list and RSS feed so advisories page your on-call rather than waiting for a news cycle, and establish a defined SLA for critical CMS patches — measured in hours, aligned to the reality that public exploitation of flaws like this one begins within days of disclosure.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.