NVD has published CVE-2026-120539, a CVSS 9.8 (Critical) vulnerability affecting the Restrictions for BuddyPress plugin for WordPress — all versions up to and including 1.5.4. The flaw allows unauthenticated, network-exploitable remote code execution against any WordPress site running a vulnerable version of the plugin.
This is not a theoretical risk. The vulnerability is a textbook PHP eval() injection that requires no authentication, no user interaction, and no special conditions — just a crafted HTTP request to a reachable WordPress site. WordPress powers a substantial share of the public web, and BuddyPress-adjacent plugins are common on community, membership, and intranet portals. If your organization — or any of your clients — runs this plugin, treat this as an emergency patch event and begin retrospective compromise assessment immediately.
Technical Analysis
Affected Product and Versions
- Product: Restrictions for BuddyPress plugin for WordPress
- Affected versions: All versions up to and including 1.5.4
- CVE: CVE-2026-120539
- CVSS v3.1: 9.8 (Critical) — Attack Vector: Network, Attack Complexity: Low, Privileges Required: None, User Interaction: None
- Advisory: https://nvd.nist.gov/vuln/detail/CVE-2026-120539
Root Cause: eval() + Double-Quoted String Interpolation
The vulnerability stems from a classic and unforgivable PHP anti-pattern: the plugin splices the attacker-controlled request URI into a PHP expression inside a double-quoted string and passes it to eval().
The critical nuance defenders need to understand is why common mitigations fail here:
- PHP interpolates double-quoted strings. A payload of the form
{${...}}embedded in the URL path is evaluated during string interpolation, beforeeval()even runs. - Because execution happens at the interpolation layer, the attacker does not need to break out of quotes — which means WordPress' built-in input slashing/escaping (
wp_magic_quotes-style handling) provides zero mitigation. - The result: an unauthenticated attacker places a payload like
/page/{${php_code_here}}in the request URI, and the code executes in the context of the web server / PHP-FPM worker process.
Attack Chain (Defender's View)
- Attacker sends a crafted GET request with
{${...}}syntax in the URL path to any page handled by the vulnerable plugin. - The plugin builds a double-quoted string containing the raw request URI and passes it to
eval(). - PHP interpolates the string, executing the embedded payload (e.g.,
{${system($_GET['cmd'])}}or{${file_put_contents(...)}}). - Code executes as the web server user (typically
www-data,apache, ornginx), enabling webshell deployment, reverse shells, database credential theft fromwp-config.php, and lateral movement.
Exploitation Status
At the time of publication, NVD has classified the flaw as network-exploitable with a critical score. Given the trivial exploitation complexity — a single HTTP request with no authentication — defenders should operate under the assumption that scanning and exploitation attempts will begin within hours to days of public disclosure, consistent with historical patterns for unauthenticated WordPress plugin RCEs. Check CISA KEV (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) and the Wordfence threat intelligence feed for confirmation of in-the-wild activity. Do not wait for KEV listing to act on a CVSS 9.8 unauthenticated RCE with public technical details.
Detection & Response
There are two high-fidelity detection angles for this vulnerability:
- Pre/post-exploitation (network/log layer): HTTP requests containing
{${in the URI — the interpolation payload signature. This string has virtually no legitimate reason to appear in a URL path. - Post-exploitation (host layer): The web server or PHP-FPM process spawning shells, interpreters, or download tools — the universal artifact of a successful PHP RCE.
SIGMA Rules
---
title: CVE-2026-120539 Restrictions for BuddyPress eval() Injection Attempt
description: Detects HTTP requests containing PHP complex curly brace interpolation syntax ({${) in the request URI, indicative of exploitation attempts against the Restrictions for BuddyPress WordPress plugin eval() injection (CVE-2026-120539).
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-120539
- https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/04/06
id: 9c2e4a71-3b8d-4f16-a2e5-7d1c9b4e6f30
status: experimental
logsource:
category: webserver
detection:
selection:
cs-uri|contains:
- '{${'
- '%7B%24%7B'
- '%7b%24%7b'
condition: selection
falsepositives:
- Extremely rare; legitimate URLs should not contain PHP interpolation syntax in raw or URL-encoded form
level: critical
---
title: Web Server or PHP-FPM Spawning Shell or System Tools
description: Detects web server or PHP worker processes spawning command shells, script interpreters, or download utilities — a strong post-exploitation indicator of PHP remote code execution such as CVE-2026-120539.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-120539
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/04/06
id: 4f7a1d83-6c2b-4e59-b8a1-2d9f5c3e7a41
status: experimental
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- '/php-fpm'
- '/php-fpm8.1'
- '/php-fpm8.2'
- '/php-fpm8.3'
- '/php8.1-fpm'
- '/php8.2-fpm'
- '/php8.3-fpm'
- '/apache2'
- '/httpd'
- '/nginx'
selection_child:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/curl'
- '/wget'
- '/python'
- '/python3'
- '/perl'
- '/nc'
- '/ncat'
- '/base64'
- '/chmod'
condition: all of selection_*
falsepositives:
- Rare legitimate plugin functionality invoking system commands (e.g., image processing); investigate any hit
level: high
---
title: Webshell Dropped in WordPress Content Directory
description: Detects creation of PHP files in WordPress uploads or plugin directories by the web server process, consistent with post-exploitation webshell deployment following RCE such as CVE-2026-120539.
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-120539
- https://attack.mitre.org/techniques/T1505/003/
author: Security Arsenal
date: 2026/04/06
id: 1b5e8c42-7d3a-4f61-9c24-8e2b6a5d4f19
status: experimental
logsource:
category: file_event
product: linux
detection:
selection_path:
TargetFilename|contains:
- '/wp-content/uploads/'
- '/wp-content/plugins/'
- '/wp-content/themes/'
- '/wp-content/mu-plugins/'
- '/wp-includes/'
selection_ext:
TargetFilename|endswith:
- '.php'
- '.phtml'
- '.phar'
- '.php5'
- '.php7'
- '.inc'
condition: all of selection_*
falsepositives:
- WordPress plugin/theme updates and media handling plugins that generate PHP; correlate with update windows and process lineage
level: high
Tuning note: Rule one ({${ in URI) is exceptionally high-fidelity — that byte sequence in a request path is an attack artifact, not application behavior. Run it against reverse proxy, WAF, ModSecurity, and web server access logs, and include the percent-encoded variants (%7B%24%7B) since many log pipelines record the raw encoded URI.
KQL (Microsoft Sentinel / Defender)
This query hunts for the interpolation payload signature across ingested web/proxy logs and Syslog. It assumes Apache/Nginx logs, WAF logs, or reverse proxy telemetry arriving via CommonSecurityLog, Syslog, or a custom IIS/W3C table.
// CVE-2026-120539: Hunt for {${ PHP interpolation payloads in request URIs
let lookback = 30d;
let payload_patterns = dynamic(["{${", "%7B%24%7B", "%7b%24%7b", "${IFS}"]);
union isfuzzy=true
(CommonSecurityLog
| where TimeGenerated > ago(lookback)
| where RequestURL has_any (payload_patterns)
| project TimeGenerated, SourceIP, DestinationHostName, RequestURL, RequestMethod, DeviceVendor, DeviceProduct, SentBytes, ReceivedBytes),
(Syslog
| where TimeGenerated > ago(lookback)
| where SyslogMessage has_any (payload_patterns)
| project TimeGenerated, HostIP, Computer, ProcessName, SyslogMessage),
(W3CIISLog
| where TimeGenerated > ago(lookback)
| where csUriStem has_any (payload_patterns) or csUriQuery has_any (payload_patterns)
| project TimeGenerated, cIP, sSiteName, csUriStem, csUriQuery, scStatus, csUserAgent)
| extend Indicator = "CVE-2026-120539 eval interpolation attempt"
| sort by TimeGenerated desc
Follow-up post-exploitation hunt for web servers spawning shells (Linux hosts reporting via Defender for Endpoint or Sysmon-for-Linux):
// Post-exploitation: PHP/web server spawning shells or download tools
DeviceProcessEvents
| where TimeGenerated > ago(14d)
| where InitiatingProcessFileName has_any ("php-fpm", "apache2", "httpd", "nginx")
| where FileName in~ ("sh", "bash", "dash", "curl", "wget", "python3", "perl", "nc", "ncat", "base64")
| project TimeGenerated, DeviceName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, AccountName
| sort by TimeGenerated desc
Velociraptor VQL
Use this hunt across your WordPress hosting fleet to identify post-exploitation process lineage and recently created PHP files in content directories (potential webshells).
-- CVE-2026-120539 post-exploitation hunt:
-- 1) Shells/tools spawned by web server or PHP-FPM
-- 2) Recently modified PHP files in wp-content (possible webshells)
-- Part 1: Suspicious process lineage
SELECT Pid, Ppid, Name, Exe, CommandLine, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ '(curl|wget|nc |ncat|bash -i|/bin/sh|python3? -c|perl -e|base64 -d)'
AND (Username =~ '(www-data|apache|nginx|nobody)'
OR Exe =~ '(php-fpm|apache2|httpd)')
-- Part 2: PHP files modified in the last 14 days under wp-content
-- Run separately as a glob hunt on each web root:
-- SELECT FullPath, Size, Mtime, Ctime
-- FROM glob(globs='/var/www/**/wp-content/**/*.php')
-- WHERE Mtime > (now() - 1209600)
-- ORDER BY Mtime DESC
Remediation & Verification Script
Run this on WordPress hosts (or against your fleet via Ansible/Salt) to identify vulnerable installs, verify the plugin version, and apply the fix. Adjust WP_PATH and the web user to your environment.
#!/bin/bash
# CVE-2026-120539: Detect and remediate vulnerable Restrictions for BuddyPress plugin
# Run as root or a user with write access to the WordPress installation.
set -euo pipefail
WP_PATH="${1:-/var/www/html}"
PLUGIN_DIR="$WP_PATH/wp-content/plugins/restrictions-for-buddypress"
LOG="/var/log/cve-2026-120539-remediation.log"
echo "[$(date -Iseconds)] Starting CVE-2026-120539 check on $WP_PATH" | tee -a "$LOG"
# 1) Locate the plugin and read its version header
if [ -d "$PLUGIN_DIR" ]; then
MAIN_FILE=$(grep -rl "^Version:" "$PLUGIN_DIR" --include="*.php" | head -n1)
VERSION=$(grep -m1 "^Version:" "$MAIN_FILE" | awk '{print $2}' | tr -d '\r')
echo "[+] Plugin found. Installed version: $VERSION" | tee -a "$LOG"
# Version check: 1.5.4 and below are vulnerable
if [ "$(printf '%s\n' "1.5.4" "$VERSION" | sort -V | head -n1)" = "$VERSION" ] || [ "$VERSION" = "1.5.4" ]; then
echo "[!] VULNERABLE VERSION DETECTED ($VERSION <= 1.5.4)" | tee -a "$LOG"
# 2) Preferred action: update via WP-CLI (use the fixed release from wordpress.org)
if command -v wp >/dev/null 2>&1; then
echo "[+] Attempting plugin update via WP-CLI..." | tee -a "$LOG"
sudo -u www-data wp plugin update restrictions-for-buddypress --path="$WP_PATH" --allow-root 2>&1 | tee -a "$LOG" || true
fi
# 3) If no fixed version is available, DEACTIVATE the plugin as a workaround
NEW_VERSION=$(grep -m1 "^Version:" "$MAIN_FILE" | awk '{print $2}' | tr -d '\r' 2>/dev/null || echo "$VERSION")
if [ "$NEW_VERSION" = "$VERSION" ]; then
echo "[!] No updated version applied. Deactivating plugin as interim workaround." | tee -a "$LOG"
if command -v wp >/dev/null 2>&1; then
sudo -u www-data wp plugin deactivate restrictions-for-buddypress --path="$WP_PATH" --allow-root 2>&1 | tee -a "$LOG"
else
# Manual deactivation fallback: move the plugin directory aside
mv "$PLUGIN_DIR" "${PLUGIN_DIR}.disabled-$(date +%Y%m%d%H%M%S)"
echo "[+] Plugin directory moved aside (WP-CLI unavailable)." | tee -a "$LOG"
fi
fi
else
echo "[+] Version $VERSION is NOT in the vulnerable range." | tee -a "$LOG"
fi
else
echo "[+] Plugin not installed at $PLUGIN_DIR — host not affected by this plugin." | tee -a "$LOG"
fi
# 4) Retrospective: grep web access logs for exploitation attempts ({${ raw or encoded)
echo "[*] Scanning access logs for {\${ exploitation attempts (last available logs)..." | tee -a "$LOG"
for LOGFILE in /var/log/apache2/access.log /var/log/nginx/access.log /var/log/httpd/access_log; do
if [ -f "$LOGFILE" ]; then
HITS=$(grep -Ei '\{%24\$\{%7B|\{\$\{|%7[Bb]%24%7[Bb]' "$LOGFILE" | tail -n 50 || true)
if [ -n "$HITS" ]; then
echo "[!!!] EXPLOITATION ATTEMPTS FOUND in $LOGFILE:" | tee -a "$LOG"
echo "$HITS" | tee -a "$LOG"
echo "[!!!] Treat this host as potentially compromised. Isolate and begin IR." | tee -a "$LOG"
fi
fi
done
echo "[$(date -Iseconds)] Check complete. Review $LOG for findings." | tee -a "$LOG"
Remediation
- Update the plugin immediately. Upgrade Restrictions for BuddyPress to the latest release from the official WordPress plugin repository (https://wordpress.org/plugins/) — any version newer than 1.5.4. Confirm the running version in
wp-admin → Pluginsor viawp plugin list. - If no patched version is available, deactivate and remove the plugin. There is no safe configuration for a pre-auth
eval()injection — disabling is the only valid workaround. Note that deactivation may impact BuddyPress content-restriction features; plan for a replacement. - Retrospective log review (mandatory). Search all web access, WAF, and reverse proxy logs for requests containing
{${or%7B%24%7Bgoing back at least 30 days (or your full retention window). Any hit on a host running a vulnerable version must be treated as a potential successful compromise. - Assume-breach actions for any positive log hits: isolate the host, acquire memory/disk if feasible, audit
wp-contentfor unauthorized PHP files (webshells), review WordPress admin users for rogue accounts, and rotate all secrets reachable from the server — database credentials inwp-config.php, WordPress salts/keys (AUTH_KEY, etc.), API keys, and any service account passwords. - Deploy compensating controls: add a WAF rule blocking
{${(and its URL-encoded forms) in the request URI; block PHP execution inwp-content/uploadsvia web server config; and run PHP-FPM under a dedicated, least-privilege user withopen_basedirrestrictions. - Monitor CISA KEV (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) for the addition of CVE-2026-120539, which will trigger Binding Operational Directive 22-01 remediation deadlines for federal agencies and should anchor your internal SLA. Regardless of KEV status, treat a CVSS 9.8 unauthenticated WordPress RCE as a 24–72 hour patch window in your vulnerability management program.
The larger lesson: eval() on any user-controllable input is a critical finding in any code review or pentest, full stop. If your organization develops or vendors WordPress plugins, add static analysis rules (e.g., eval(), create_function, dynamic include of request-derived paths) to your CI pipeline and plugin review process.
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.