All articles
Exploited vulnerabilitiesAwarely Monitor editorial team7 minUpdated

WordPress CVE-2026-87902: release, theme and logs

On 22 September 2026, WordPress released 7.1.2 and updates for older branches to fix CVE-2026-87902. The flaw in page-template resolution lets an unauthenticated attacker make WordPress include a chosen local .php file from outside the theme directories. Under certain conditions, that leads to remote code execution. The project’s advisory scores it CVSS 9.2. Update, 27 September: CISA added CVE-2026-87902 to its KEV catalog on 25 September, with a 28 September deadline for US federal agencies.

Patchstack observed exploitation attempts on the day of release, and Romania’s DNSC issued a WordPress Core alert on 24 September. Teams running many sites need to answer two questions: has each installation actually reached a fixed release, and do the theme and server meet the conditions that turn file inclusion into code execution?

What is confirmed

WordPress advisory GHSA-7hp8-65ch-5whp describes a path traversal in get_page_template(). Versions 4.7.0–7.1.1 are affected. The fix ships in 7.1.2, 7.0.6, 6.9.9 and 6.8.10, and has been backported to every branch down to 4.7 (for example 4.7.37).

A vulnerable release does not automatically mean code execution. The advisory lists two prerequisites: the active parent or child theme has a top-level directory whose name starts with “page-”, such as page-templates, and the server holds a .php file readable by the web server account that can be abused. The example given is PEAR’s pearcmd.php, usable when register_argc_argv is on. Help Net Security adds that the request must resolve to a published Page reachable without logging in.

The advisory names Twenty Twelve and Twenty Fourteen as affected, along with popular third-party themes such as Neve, Hestia and Sydney. It also states that the official PHP Docker image and the default cPanel configuration with PHP older than 8.5 meet the server-side condition.

What exploitation looks like and what is unknown

Patchstack reports the first exploitation requests on 22 September at 11:49 UTC and more than ten times that volume the next day, after public Nuclei templates appeared. It describes three stages: testing inclusion with harmless WordPress core files, checking for pearcmd.php, then writing PHP files to /tmp or /var/tmp. The Hacker News, also citing Previdian telemetry, independently confirms attempts began within hours.

The reviewed sources give no count of compromised sites. Honeypot hits show active scanning and exploitation, not how many installations met the prerequisites. Do not call this a zero-day: public information does not show exploitation before the fix.

Check the running release of every installation

  • ▸Inventory every WordPress install: marketing sites, campaign microsites, staging, forgotten subdomains and agency-managed sites.
  • ▸Read the version on the server, for example with wp core version or from wp-includes/version.php. Background updates only start where they are allowed; installs with updates disabled, Git-based deployments and container images rebuilt from old sources can stay vulnerable.
  • ▸For containers, check the image actually running in production, not just the Dockerfile. An update applied inside a container disappears on the next redeploy if the base image has not changed.
  • ▸On an older branch, install that branch’s fixed release but plan the migration: WordPress states only the latest version is actively supported.

Establish whether the prerequisites are met

While remediation is under way, prioritise sites where both conditions hold. Check whether the active or parent theme has a top-level page-* directory and whether pearcmd.php exists in the usual PHP paths. Check register_argc_argv in the PHP configuration used by the web server, not the command-line one.

Patchstack suggests two interim measures if updating is delayed: reject pagename parameters containing traversal sequences, and disable register_argc_argv. These reduce the risk of the observed chain but do not replace the update, because inclusion of other local files remains possible.

Look for traces in logs and on disk

An access-log match shows an attempt; it does not prove compromise. An unknown PHP file on disk, however, justifies treating the site as an incident: preserve artefacts, rotate database and administrator credentials, and review recently added users and plugins.

  • ▸Requests where pagename contains %2e%2e or %252e%252e, especially alongside page_id on the site root.
  • ▸Strings such as pearcmd, +config-show or +config-create in URLs or POST bodies.
  • ▸Normal page URLs that returned OPML or RSS content, which Patchstack describes as a sign of successful inclusion.
  • ▸New or unexpected .php files in /tmp and /var/tmp, and recently added PHP files in web directories.

Close the exposure with evidence

Awarely Monitor tracks the CVE, priority and decision evidence for each asset. Version, PHP configuration and log checks happen on the servers and in the hosting platform; a “resolved” status without them does not tell you whether the site was exposed.

  • ▸For each site: the starting release, the release after updating and how it was checked on the server.
  • ▸The prerequisite check result: active theme, pearcmd.php presence and register_argc_argv value.
  • ▸The log window reviewed, findings and the limits of the review.
  • ▸An owner and deadline for any exception, such as a site that cannot be updated immediately.

How to monitor CVEs and get alerts for products in your inventory