WordPress Vulnerability CVE-2026-87902 Exploited: Update to 7.1.2

Critical WordPress core vulnerability CVE-2026-87902 (CVSS 9.2) was exploited within hours of the patch. Affected versions, how to check your site, IoCs and what to do now.
Summary
A critical WordPress vulnerability, CVE-2026-87902, was being exploited within hours of the patch being released on 22 September 2026. The flaw in WordPress core lets an unauthenticated attacker make WordPress run a readable .php file on the server as a page template (local file inclusion, LFI). When certain conditions are met, this becomes remote code execution (RCE). According to the official advisory, the default cPanel configuration with PHP versions before 8.5 meets one of those conditions, which makes this urgent for business websites on shared hosting.
- CVSS 4.0: 9.2 (Critical) – no authentication or user interaction required.
- Affected versions: WordPress 4.7.0 to 7.1.1. The fix shipped in WordPress 7.1.2 and was backported to every branch down to 4.7.37.
- Actively exploited: Patchstack saw the first attempts on 22 September at 11:49 UTC; attempts to write PHP files to disk via
pearcmd.phpstarted the same day. A ready-made Nuclei scanning template has been circulating since 23 September. - CISA KEV: Added to the catalog on 25 September 2026, with a remediation deadline of 28 September for US federal agencies.
WordPress vulnerability: technical details
The bug sits in get_page_template(), the function that decides which template file WordPress uses for a page. By placing encoded path traversal sequences (%2e%2e) in the pagename parameter, an attacker can make WordPress include a readable .php file outside the active theme directories. According to Patchstack, the requests also carry a page_id that resolves to a real page; without it WordPress returns a 404 and the vulnerable code path is never reached.
Two preconditions turn the file inclusion into code execution:
- Theme: The active theme (child or parent) has a top-level directory whose name starts with
page-, such aspage-templates. The advisory names the legacy Twenty Twelve and Twenty Fourteen themes as well as popular third-party themes Neve, Hestia and Sydney. - Server: A suitable
.phpfile readable by the web server account exists on the server. Attackers use PEAR'spearcmd.phpfor this. Withregister_argc_argvenabled in PHP, the query string is passed to pearcmd as command-line arguments, allowing the attacker to write a PHP file with arbitrary content to disk. The advisory states that the officialphpDocker image and the default cPanel configuration with PHP before 8.5 are affected.
Patchstack describes three stages of attack traffic: first, probes against harmless core files such as wp-links-opml.php to test whether the inclusion works; second, +config-show requests to confirm pearcmd is reachable; third, +config-create requests that write PHP files to /tmp or /var/tmp, which amounts to code execution. Previdian's honeypots also recorded requests trying to pull a web shell uploader hosted on GitHub.
Affected and fixed versions
| WordPress branch | Affected | Fixed |
|---|---|---|
| 7.1 | 7.1.0 – 7.1.1 | 7.1.2 |
| 7.0 | 7.0.0 – 7.0.5 | 7.0.6 |
| 6.9 | 6.9.0 – 6.9.8 | 6.9.9 |
| 6.8 | 6.8.0 – 6.8.9 | 6.8.10 |
| 6.7 | 6.7.0 – 6.7.8 | 6.7.9 |
| 4.7 – 6.6 | All releases before the branch's fixed version | 6.6.9, 6.5.12, 6.4.12, 6.3.12, 6.2.13, 6.1.14, 6.0.16, 5.9.18, 5.8.17, 5.7.19, 5.6.21, 5.5.22, 5.4.23, 5.3.25, 5.2.28, 5.1.26, 5.0.29, 4.9.33, 4.8.32, 4.7.37 |
Because WordPress installs security releases automatically by default, many sites will already be patched; Previdian expects many exploitation attempts but relatively few actual compromises for that reason. Sites with automatic updates disabled or failed updates remain exposed.
Is my WordPress site affected? Checklist
- WordPress version: Check Dashboard › Updates in wp-admin. If your version is equal to or newer than the fixed release for your branch in the table, you are patched against this flaw.
- Theme directory: In the cPanel File Manager, open
wp-content/themes/and check whether the active theme (and its parent theme, if you use a child theme) has a top-level folder starting withpage-. - PEAR: Check whether
pearcmd.phpexists on the server. The paths attackers try are/usr/local/lib/php/pearcmd.php,/usr/share/php/pearcmd.phpand/usr/share/pear/pearcmd.php. On shared hosting, ask your hosting provider if you cannot see these folders. - register_argc_argv: Check whether this setting is
Onin cPanel's MultiPHP INI Editor or PHP options, or in thephpinfo()output. Delete any phpinfo file you create once you are done. - Indicators of compromise (IoCs): Look for unexpected
.phpfiles in/tmpand/var/tmp, in particularpoc87902.php,wp-pear-rce-flag.php,luci_*.phpandzeta_*.php. According to Patchstack, their presence means a file-write attack succeeded and the host should be treated as compromised, not merely scanned. If you have no access to these folders, ask your hosting provider to check. - Access logs: In your raw access logs, search for
%2e%2eor%252e%252ein thepagenameparameter,pagenamevalues starting withtemplates%2f,pagenameandpage_idin the same request, the stringspearcmd,+config-showand+config-create, and the user agentscve-2026-87902-poc/1.0andnuclei-cve-2026-87902/1.0. A 200 response containing OPML or RSS output from a normal page URL shows that the inclusion ran on your site.
What to do now
- Update WordPress immediately to 7.1.2 or the fixed release for your branch (7.0.6, 6.9.9, 6.8.10 … 4.7.37). Take a backup first. Since the fix was backported to all branches, older sites can be patched without a major version upgrade.
- Check
/tmpand/var/tmpfor the IoC files above and review your logs back to 22 September. - If you find signs of compromise: change all WordPress admin passwords, cPanel/FTP and database passwords, and regenerate the security keys (salts) in
wp-config.php. Review unknown admin accounts and files, and restore from a clean backup if needed. - Mind your breach notification duties: If personal data such as customer or employee records was accessed, the GDPR (and Turkey's KVKK) generally require notifying the data protection authority within 72 hours of becoming aware of the breach.
- Keep automatic updates on: Make sure automatic security updates for WordPress core have not been disabled.
Can't update right away? Temporary workarounds
These do not replace the patch; they only reduce the risk until you can update:
- Disable
register_argc_argvin PHP. This does not fix the inclusion, but it breaks the pearcmd chain to code execution. - Remove PEAR if you do not need it; on shared hosting, ask your provider.
- Block requests with
%2e%2eor%252e%252ein thepagenameparameter at your web application firewall (WAF). POST requests now outnumber GET in the attack traffic, so the rule must cover both the query string and the POST body. Legitimate page slugs never contain these sequences, so normal traffic is not affected.
Timeline (UTC)
- 22 September 2026: WordPress 7.1.2 and backported fixes released; advisory GHSA-7hp8-65ch-5whp published.
- 22 September, 11:49: Patchstack observes the first exploitation attempt (reconnaissance against harmless core files).
- 22 September, 15:34: First attempt to write a file to disk via
pearcmd.php. - 23 September: Public scanning tooling, including a named Nuclei template, in circulation; attack volume peaks around midday.
- 25 September: CISA adds CVE-2026-87902 to its Known Exploited Vulnerabilities (KEV) catalog.
- 28 September: Remediation deadline for US federal agencies.
Also patch Elementor to 4.3.2
Versions 4.3.0 and 4.3.1 of the Elementor Website Builder plugin contain a CSRF flaw that lets an attacker create a new administrator account by getting a logged-in admin to open a single link. The flaw has no CVE yet and is fixed in Elementor 4.3.2. If you use Elementor, update the plugin too and check your user list for unknown administrator accounts.
How Doğa Network can help
Our team can help with WordPress version and theme checks, safe updates, PHP settings, WAF rules and reviewing your site for signs of compromise. Call us on +90 850 888 3642 or email hi@doga.network.
Sources
- WordPress – Security advisory GHSA-7hp8-65ch-5whp
- Patchstack – CVE-2026-87902: Attackers Started Probing WordPress Sites Hours After the Patch
- The Hacker News – Attackers Exploit WordPress CVE-2026-87902 Within Hours of Disclosure
- CISA – Known Exploited Vulnerabilities Catalog
- NVD – CVE-2026-87902
- BleepingComputer – Elementor WordPress flaw lets attackers create admin accounts



