Skip to content
CVE-2026-119977 Elastic Security · Elastic

Detect WordPress Core TOCTOU Race Condition During Upgrade Window: Staged Installer RCE (CVE-2026-119977) in Elastic Security

Detects exploitation of CVE-2026-119977, a time-of-check time-of-use (TOCTOU) race condition (CWE-367) in WordPress Core versions 4.7 through 7.1.3. The flaw is caused by predictable, web-accessible staging paths used during full-package core upgrades. An unauthenticated attacker can use this to execute code on the server during the upgrade window. CISA added this CVE to the Known Exploited Vulnerabilities catalog (KEV) on 2026-11-03. This detection looks for the behavioral signatures of exploitation: rapid repeated requests to upgrade/update endpoints (wp-admin/update-core.php, wp-admin/async-upload.php, wp-cron.php triggering updates), unexpected PHP file writes into wp-content/upgrade, wp-content/plugins or wp-includes during an upgrade, and web-server child processes spawning shells shortly after update activity.

MITRE ATT&CK

Tactic
Initial Access Execution Privilege Escalation

Elastic Detection Query

Elastic Security (Elastic)
eql
// df00tech DF00-312b9d61e0 · https://df00tech.com/detections/CVE-2026-119977 · licence: https://df00tech.com/detections/licence
sequence by host.name with maxspan=5m
  [ file where event.type in ("creation", "change") and
      file.extension == "php" and
      file.path : ("*/wp-content/upgrade/*", "*/wp-content/plugins/*", "*/wp-includes/*", "*/wp-admin/*") ]
  [ process where event.type == "start" and
      process.parent.name in ("php-fpm", "httpd", "apache2", "nginx", "w3wp.exe") and
      process.name in ("sh", "bash", "dash", "python", "perl", "cmd.exe", "powershell.exe") ]
critical severity high confidence

Correlates a PHP file write into WordPress upgrade/plugin/include directories with a subsequent shell spawned by the web-server process, the post-exploitation signature of a successful payload swap.

Data Sources

Endpoint file integrity monitoringEndpoint process telemetry (Elastic Defend/auditd)

Required Tables

logs-endpoint.events.file-*logs-endpoint.events.process-*

False Positives & Tuning

  • Legitimate WordPress auto-update writing files into wp-content/upgrade (without the following shell spawn).
  • Plugin installers that invoke helper processes during activation.
  • Backup or deployment tooling that writes PHP files and runs shell steps.

Other platforms for CVE-2026-119977


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 Burst requests to WordPress upgrade endpoints

    Expected signal: Web access logs show >=10 requests to update-core.php and wp-cron.php from 127.0.0.1 within seconds.

  2. Test 2 Staged malicious PHP write into upgrade directory

    Expected signal: File integrity/EDR records a PHP file creation under wp-content/upgrade.

  3. Test 3 Web-server process spawns shell after upgrade activity

    Expected signal: EDR records a shell process whose ancestry/context is the web-server account referencing wp-content paths.


Response Playbook

Triage

  1. Confirm the affected host's WordPress Core version; versions 4.7 through 7.1.3 are vulnerable. Check wp-includes/version.php ($wp_version) and site health.
  2. Review web access logs around the alert window for a burst of requests to /wp-admin/update-core.php, /wp-admin/async-upload.php and /wp-cron.php from a single source IP, which indicates an attempt to exploit the upgrade window.
  3. Inspect wp-content/upgrade, wp-content/plugins and wp-includes for PHP files with modification times inside the suspected window or that do not match the known distribution checksums.
  4. Correlate the web activity with EDR process telemetry to see whether the web-server process (php-fpm/httpd/w3wp) spawned a shell or interpreter shortly afterward.

Containment

  1. Isolate the affected web host from the network or place it behind a WAF rule blocking the upgrade endpoints until patched.
  2. Upgrade WordPress Core to 7.1.4 immediately, and disable background/auto-update triggering (wp-cron) during remediation to close the exposure.
  3. Rotate all WordPress secret keys/salts, admin credentials and any database or API credentials reachable from the host, as RCE implies full compromise.

Evidence Collection

  1. Preserve full web access and error logs, PHP-FPM logs and wp-cron invocation logs covering the window.
  2. Capture copies of any newly written or modified PHP files in wp-content/upgrade, wp-content/plugins and wp-includes, plus their timestamps and hashes.
  3. Collect EDR process trees for the web-server account and a memory image of the web host before remediation.

Escalation Criteria

  • !Escalate to incident response if a shell or interpreter was spawned by the web-server process, or if unexpected PHP files/webshells are confirmed on disk.
  • !Escalate if credentials, database contents or customer data on the host may have been accessed or exfiltrated.
  • !Escalate to management/legal if the compromise indicates lateral movement or affects a regulated/production data store.

Investigation Guide

Forensic Artifacts

  • >New or modified PHP files in wp-content/upgrade, wp-content/plugins and wp-includes with checksums deviating from the official WordPress release.
  • >Web access log bursts to update-core.php / async-upload.php / wp-cron.php from a single source IP.
  • >Web-server process spawning sh/bash/python/cmd/powershell in EDR telemetry.
  • >Unexpected entries or modified timestamps in the site's active_plugins and cron options in wp_options.

Tuning Guidance

Baseline the IPs and user accounts that legitimately perform WordPress updates (admins, WP-CLI hosts, managed-hosting automation) and allow-list them to reduce noise. Tighten the request-count threshold and window to match the number of requests your environment emits during a normal update. For the file/process correlation queries, confirm that legitimate plugin installers in your environment do not routinely spawn shells, and exclude known deployment tooling by process path or account.


Hunting Queries

Hunts for repeated short-interval hits to WordPress upgrade endpoints from one source, a precursor to exploiting the upgrade window.

Hunting — KQL
kql
// df00tech DF00-312b9d61e0 · https://df00tech.com/detections/CVE-2026-119977 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has_any ("/wp-admin/update-core.php","/wp-admin/async-upload.php","/wp-cron.php") | summarize c=count() by cIP, bin(TimeGenerated, 5m) | where c >= 8 | order by c desc
Hunting — SPL
spl
``` df00tech DF00-312b9d61e0 · https://df00tech.com/detections/CVE-2026-119977 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="/wp-admin/update-core.php" OR uri_path="/wp-admin/async-upload.php" OR uri_path="/wp-cron.php") | bin _time span=5m | stats count by src_ip _time | where count>=8 | sort - count

Atomic Red Team Tests

Test 1 Burst requests to WordPress upgrade endpoints
linux

Simulates the access pattern of exploiting the staged upgrade window by sending rapid repeated requests to WordPress update endpoints.

Command

bash
for i in $(seq 1 20); do curl -s -o /dev/null -X POST "http://127.0.0.1:8080/wp-admin/update-core.php?action=do-core-upgrade" & curl -s -o /dev/null "http://127.0.0.1:8080/wp-cron.php" & done; wait

Cleanup

bash
echo 'No cleanup required; requests only generate access-log entries.'

Expected Telemetry

Web access logs show >=10 requests to update-core.php and wp-cron.php from 127.0.0.1 within seconds.

Expected Detection

KQL/SPL/QRadar/Sumo/Chronicle burst queries fire on the request-count threshold within the 10-minute window.

Test 2 Staged malicious PHP write into upgrade directory
linux

Simulates a malicious PHP file write into the WordPress upgrade/plugins directory during the upgrade window.

Command

bash
mkdir -p /var/www/html/wp-content/upgrade && printf '<?php system($_GET["c"]); ?>' > /var/www/html/wp-content/upgrade/evil_toctou.php

Cleanup

bash
rm -f /var/www/html/wp-content/upgrade/evil_toctou.php

Expected Telemetry

File integrity/EDR records a PHP file creation under wp-content/upgrade.

Expected Detection

Elastic EQL file-creation stage matches the PHP write into a WordPress upgrade/plugin path.

Test 3 Web-server process spawns shell after upgrade activity
linux

Simulates post-exploitation where a shell executes under the web-server account after upgrade activity.

Command

bash
sudo -u www-data bash -c 'cd /var/www/html/wp-content && /bin/sh -c "id > /tmp/toctou_rce.txt"'

Cleanup

bash
rm -f /tmp/toctou_rce.txt

Expected Telemetry

EDR records a shell process whose ancestry/context is the web-server account referencing wp-content paths.

Expected Detection

Elastic EQL sequence and CrowdStrike CQL match the web-server-to-shell spawn referencing WordPress directories.

Related Detections