Skip to content
CVE-2026-120539 Google Chronicle · YARA-L

Detect Restrictions for BuddyPress <= 1.5.4 Remote Code Execution (CVE-2026-120539) in Google Chronicle

Detects exploitation of CVE-2026-120539, a critical (CVSS 9.8) Remote Code Execution vulnerability in the Restrictions for BuddyPress WordPress plugin (all versions up to and including 1.5.4). The flaw is a code injection issue (CWE-95): the plugin splices the attacker-controlled request URI into a PHP expression inside a double-quoted string and evaluates it with eval(). Because PHP interpolates double-quoted strings, a payload of the form {${...}} in the URL path runs during interpolation, so no quote breakout is needed. The affected conditions are enabled by default and are evaluated before any logged-in check, so an unauthenticated attacker can execute arbitrary PHP with a single GET request. The site must have BuddyPress and Paid Memberships Pro active alongside this plugin. Detection focuses on HTTP requests to the plugin's endpoints carrying PHP code constructs, and on post-exploitation web-shell or child-process behavior spawned from the WordPress PHP worker. Fixed in version 1.5.5.

MITRE ATT&CK

Tactic
Initial Access Execution

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
// df00tech DF00-f20ad46a84 · https://df00tech.com/detections/CVE-2026-120539 · licence: https://df00tech.com/detections/licence
rule bp_restrict_rce_cve_2026_120539 {
  meta:
    author = "Argus"
    description = "Detects CVE-2026-120539 code injection attempts against the Restrictions for BuddyPress plugin"
    severity = "CRITICAL"
  events:
    $e.metadata.event_type = "NETWORK_HTTP"
    re.regex($e.network.http.referral_url, `/wp-admin/`) or re.regex($e.target.url, `/wp-admin/`)
    re.regex($e.target.url, `(?i)bp[-_]restrict`)
    re.regex($e.target.url, `(?i)(eval\(|base64_decode|shell_exec|system\(|create_function|<\?php|assert\()`)
  condition:
    $e
}
critical severity medium confidence

YARA-L rule matching HTTP events to bp-restrict wp-admin endpoints that carry PHP code-execution primitives in the URL.

Data Sources

Web Server LogsNetwork HTTP Telemetry

Required Tables

NETWORK_HTTP

False Positives & Tuning

  • Admin configuration containing code-like text
  • Web vulnerability scanners
  • Authorized security assessments

Other platforms for CVE-2026-120539


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 Simulated bp-restrict code-injection request

    Expected signal: Web access log entry for /wp-admin/admin.php with bp-restrict and eval/base64_decode in the query string.

  2. Test 2 Simulated PHP worker spawning shell

    Expected signal: Process creation of /bin/sh or id/uname parented by the php process.

  3. Test 3 Simulated web shell drop in uploads

    Expected signal: File creation event for a new .php file under wp-content/uploads.


Response Playbook

Triage

  1. Confirm the installed version of the Restrictions for BuddyPress (bp-restrict) plugin on the affected WordPress host; versions <= 1.5.4 are vulnerable, 1.5.5 is patched.
  2. Review the flagged web request: extract the source IP, decoded query/body, targeted endpoint, HTTP response status, and whether the PHP primitive reached a plugin handler.
  3. Correlate the request timestamp with endpoint process telemetry for child processes spawned by the php/php-fpm/web-server worker within the same window.
  4. Confirm whether BuddyPress and Paid Memberships Pro are active, since both are required for the vulnerable code path.

Containment

  1. Block the attacking source IP(s) at the WAF/edge and rate-limit or restrict access to /wp-admin/ for the affected site.
  2. Isolate the WordPress host from the network if post-exploitation child processes or web shells are confirmed.
  3. Disable the bp-restrict plugin and upgrade to version 1.5.5 or later; rotate WordPress admin and database credentials if compromise is confirmed.

Evidence Collection

  1. Preserve web server access/error logs, WAF logs, and PHP-FPM logs covering the attack window.
  2. Capture a forensic image or at minimum the WordPress webroot (wp-content/plugins, wp-content/uploads) to identify dropped web shells and modified files.
  3. Export process-execution telemetry showing any children of php/php-fpm/httpd/w3wp around the event.

Escalation Criteria

  • !Escalate to incident response if a web shell, reverse shell, or non-standard child process of the PHP worker is confirmed.
  • !Escalate if the exploitation request returned HTTP 200 with evidence of code execution, or if lateral movement / credential access from the host is observed.

Investigation Guide

Forensic Artifacts

  • >New or recently modified PHP files under wp-content/ (plugins, uploads, themes) indicating a dropped web shell
  • >Web server and PHP-FPM log entries showing bp-restrict requests with code primitives
  • >Process-execution records of shells or recon tools parented by php/php-fpm/web-server processes

Tuning Guidance

Baseline normal administrator interaction with the bp-restrict settings pages; if legitimate configuration never contains PHP tokens, tighten the regex to alert on any code primitive. Reduce noise by scoping the web-log queries to the hosts actually running WordPress with the plugin installed, and by excluding known scanner IP ranges and authorized pentest sources. Pair the web-log detections with the endpoint child-process query to prioritize alerts that show actual execution.


Hunting Queries

Aggregates bp-restrict exploitation attempts by source IP to surface scanning or repeated targeting of CVE-2026-120539.

Hunting — KQL
kql
// df00tech DF00-f20ad46a84 · https://df00tech.com/detections/CVE-2026-120539 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriQuery has_any ("bp-restrict","bp_restrict") | extend d=url_decode(csUriQuery) | where d has_any ("eval(","base64_decode","<?php","shell_exec") | summarize count() by cIP, bin(TimeGenerated, 1h)
Hunting — SPL
spl
``` df00tech DF00-f20ad46a84 · https://df00tech.com/detections/CVE-2026-120539 · licence: https://df00tech.com/detections/licence ```
index=web uri_query="*bp-restrict*" | eval d=urldecode(uri_query) | where match(d,"(?i)(eval\(|base64_decode|<\?php|shell_exec)") | stats count by src_ip

Atomic Red Team Tests

Test 1 Simulated bp-restrict code-injection request
linux

Send a crafted HTTP request to the bp-restrict endpoint containing a PHP eval primitive to validate web-log detection coverage (lab only).

Command

bash
curl -s -o /dev/null 'http://wp-lab.local/wp-admin/admin.php?page=bp-restrict&code=eval(base64_decode(%22cGhwaW5mbygpOw==%22))'

Cleanup

bash
echo 'No persistent change; clear test entries from web logs if desired.'

Expected Telemetry

Web access log entry for /wp-admin/admin.php with bp-restrict and eval/base64_decode in the query string.

Expected Detection

kql, spl, elastic_eql, qradar_aql, sumo_logic and chronicle_yaral rules fire on the decoded PHP primitive.

Test 2 Simulated PHP worker spawning shell
linux

Emulate post-exploitation by having a PHP process execute a shell command, validating endpoint child-process detection (lab only).

Command

bash
php -r 'system("id; uname -a");'

Cleanup

bash
echo 'No cleanup required; command is read-only recon.'

Expected Telemetry

Process creation of /bin/sh or id/uname parented by the php process.

Expected Detection

crowdstrike_cql ProcessRollup2 query flags the shell/recon child of php.

Test 3 Simulated web shell drop in uploads
linux

Create a benign marker PHP file in the uploads directory to emulate a dropped web shell for file-artifact hunting (lab only).

Command

bash
echo '<?php /* lab-test marker */ echo "argus-test"; ?>' > /var/www/html/wp-content/uploads/argus-test-shell.php

Cleanup

bash
rm -f /var/www/html/wp-content/uploads/argus-test-shell.php

Expected Telemetry

File creation event for a new .php file under wp-content/uploads.

Expected Detection

Forensic artifact hunt surfaces the newly created PHP file under wp-content/uploads.

Related Detections