Half the public web runs WordPress. Less than a day after the patch shipped, attackers moved from probing to writing PHP to disk. That forgotten marketing site still counts.
Get the CyberExperts Daily Brief: the day's top security news in 5 minutes. Free.
That forgotten marketing site still counts.
CVE-2026-87902 is an unauthenticated page-template path traversal that can include a local PHP file outside the theme. Under common theme + PHP settings, that inclusion becomes remote code execution. Patchstack saw reconnaissance within hours of WordPress 7.1.2; by September 23 the same operators were using pearcmd to drop shell tags in /tmp. Nuclei templates are public. If you still run anything between 4.7 and 7.1.1, update today.
Know what matters before your first meeting.
Weekday mornings. Five minutes. What changed in security, why it matters.
By subscribing you agree to our Privacy Policy.
Free. Weekday mornings. 5 minutes or less.
What happened
On September 22, WordPress released 7.1.2 (and backports down to 4.7.37) for CVE-2026-87902, a critical (CVSS 9.2) unauthenticated local file inclusion in get_page_template(). Researcher Robert Ressl reported it privately; the bug skips validate_file() on a pagename-built template candidate.
Patchstack observed first malicious requests at 11:49 UTC on September 22, the same day as the advisory. Traffic climbed an order of magnitude by September 23 and moved through three stages: (1) include harmless core files to confirm the inclusion works, (2) include pearcmd.php with +config-show to confirm PEAR + register_argc_argv, (3) +config-create to write attacker-controlled PHP under /tmp and /var/tmp (names like wp-pear-rce-flag.php, poc87902.php, luci_.php, zeta_.php). Some payloads are markers; others execute a shell command on access.
Public scanners now include nuclei-cve-2026-87902/1.0 and cve-2026-87902-poc/1.0. Official PHP Docker images and default cPanel configs (PHP before 8.5) are called out as affected for the pearcmd chain.
Why it matters
No login is needed and the tooling is automated, so attackers can spray every WordPress site they find. A successful stage-three write means the host is compromised from the attacker’s point of view even if the first drop lands in /tmp. The same primitive can write somewhere web-reachable next.
Sites that auto-update may already be safe. Everything else is a target right now, especially old branches, managed hosts that lag, and themes with a top-level page-* directory.
Know what matters before your first meeting.
Weekday mornings. Five minutes. What changed in security, why it matters.
By subscribing you agree to our Privacy Policy.
Free. Weekday mornings. 5 minutes or less.
What to do first
- Update Core immediately to 7.1.2, or the matching security release on your branch (7.0.6 / 6.9.9 / 6.8.10 … down to 4.7.37). Verify the version on disk; do not assume auto-update landed.
- If you cannot patch in the next hour: WAF/reject
pagenamevalues containing traversal (%2e%2e,%252e%252e,../) — real slugs never need those. - Disable
register_argc_argvwhere you can (breaks the pearcmd RCE chain; does not fix the inclusion itself). - Hunt access logs for
pagename+page_idtogether,pearcmd,+config-show,+config-create, and the named Nuclei/PoC user-agents. - Check
/tmpand/var/tmpfor unexpected.phpfiles; treat finds as compromise, not “just a scan.” - Review themes for a top-level
page-*directory (e.g.page-templates) — that is a key precondition.
Forward this
If you own a marketing site, blog, or customer portal on WordPress: update Core to 7.1.2 (or the security release on your branch) today. Check that wp-includes/version.php shows the fixed release. Don’t assume auto-update ran.
Details
- CVE: CVE-2026-87902 — path traversal → LFI → conditional RCE (CVSS 9.2)
- Affected: WordPress Core 4.7.0–7.1.1
- Fixed: 7.1.2 and backports through 4.7.37 (pre-4.7: no fix)
- Auth: None
- RCE preconditions: theme top-level
page-*dir; readable local.phptarget (often PEARpearcmd.php);register_argc_argvfor the argv/pearcmd chain - First observed: 2026-09-22; file-write stage by ~15:34 UTC same day; commoditized by 2026-09-23
Hunt / verify
- Confirm
wp-includes/version.phpshows a fixed release. - Search logs for
%2e%2e/%252e%252einpagename,templates%2fprefixes, pairedpage_id+pagenameon/or/index.php, and OPML/RSS body returned from a normal page URL (stage-one success). - Host check: unexpected PHP under
/tmp,/var/tmp; unknown admin users, plugins, themes, webshells.
Confirm wp-includes/version.php shows 7.1.2 (or your branch’s security release); hunt pagename traversal + pearcmd; wipe unexpected PHP under /tmp.
Sources
- https://www.bleepingcomputer.com/news/security/hackers-start-exploiting-critical-wordpress-flaw-for-code-execution/
- https://patchstack.com/articles/cve-2026-87902-attackers-started-probing-wordpress-sites-hours-after-the-patch/
- https://ressl.ch/blog/cve-2026-87902-wordpress/
- https://wordpress.org/news/ (7.1.2 / GHSA-7hp8-65ch-5whp)
Newer CyberExperts coverage on this topic
This article still works as background. If you want the current picture, start with the freshest related coverage below and today's brief.
CMMC After the Phase 2 Suspension: What Contractors Still Have to Do in 2026
Short answer: on July 13, 2026, the Department of War suspended the move to CMMC Phase 2, which was due on November...
Blue Team Certifications (2026): CySA+, GCIA, BTL1 and SC-200 Compared
Blue team certifications compared from the issuers' own pages: CompTIA CySA+ V4, GIAC GCIA, BTL1 from Centri (Security Blue Team) and Microsoft...
Digital Forensics Certifications (2026): GCFA, CHFI, EnCE and CCE Compared
Digital forensics certifications compared from the issuers' own pages: GIAC GCFA and GCFE, EC-Council CHFI, OpenText EnCE and ISFCE CCE, with exam...
Wednesday’s brief: Barracuda gateways go from no login to root, then Chrome 157, cPGuard and WordPress
The fastest way to catch up on what changed after this article was published.
Start your morning with the signal that matters.
Get the biggest cybersecurity developments, why they matter, and where to go deeper on CyberExperts.
By subscribing you agree to our Privacy Policy.
Free. Weekdays. Built for operators.