Back to Insights
CybersecurityPERSPECTIVE / 016

CVE-2026-87902: WordPress attacks began hours after the security patch

A page-template flaw can lead to conditional remote code execution under specific theme and PHP configurations.

Automize InsightsPublished: Nov 10, 20265 min read
Editorial diagram of WordPress routing from servers through template folders to an out-of-bound file

On September 22, 2026, WordPress released 7.1.2 to fix CVE-2026-87902, a page-template flaw that can include a readable PHP file outside the active theme. Patchstack observed attack attempts the same day; CISA added the CVE to its Known Exploited Vulnerabilities catalog on September 25. For organizations, the issue is not only upgrading software but verifying the configuration and ownership of their live websites. [1][2][3][4]

A Core flaw, but code execution is conditional

The vulnerability affects path handling in get_page_template(). Manipulated page-template resolution can include a readable local PHP file beyond the theme boundary: path traversal leading to local file inclusion (LFI). Remote code execution (RCE) requires additional conditions and does not automatically occur on every affected WordPress installation. [1][2]

A documented prerequisite is a top-level folder starting with page- in the active or parent theme, in combination with an appropriate local PHP file and server configuration. One observed chain uses PEAR's pearcmd.php when register_argc_argv is enabled. An affected version number alone does not prove a successful compromise. [1][3]

Attackers moved from probing to file-write attempts within hours

Patchstack observed the first blocked attempt at 11:49 UTC on September 22. Initial requests probed template handling by including ordinary WordPress Core files. At 15:34 UTC the same day, it observed attempts to write PHP files through pearcmd.php. [3]

On September 23 the company reported more than ten times the initial evening's traffic, alongside publicly available scanning tools. These were observed exploitation attempts, not proof that all targeted sites were compromised. CISA's KEV listing establishes that exploitation took place in the wild. [3][4]

A functioning website may still be exposed

WordPress powers corporate sites, forms, recruitment pages and WooCommerce stores. Successful code execution could enable website tampering, access to data readable by the web process, or server resource abuse. These are possible effects, not confirmed losses across all installations. [1][3]

When maintenance is outsourced, organizations may not know the actual WordPress version, active theme, PHP settings or patch owner. A vendor security release has no protective effect until the change is deployed to and verified on the running site.

Patch, verify and check for earlier compromise

WordPress 7.1.2 first fixed the issue on the 7.1 branch, with corresponding backports to older branches. As of November 10, 2026, security release 7.1.4 was issued on October 28. Back up, check compatibility, upgrade to the newest suitable maintained version and verify the running release and business workflows. [2][5]

Review historical access logs for unusual pagename values, pearcmd references and unexpected PHP files in /tmp or /var/tmp. WAF rules and disabling register_argc_argv may obstruct certain chains but do not replace the Core fix. If unexpected file writes or execution are found, respond as a security incident, not merely a missed update. [1][3]

Verification belongs to the patching process

CVE-2026-87902 demonstrates how quickly scanning and exploitation can follow a security release. Companies should know every WordPress deployment, its maintainer, its patch status and the evidence used to verify it.

An effective website security process includes asset inventory, backups, patch verification, monitoring and incident response. A business website is an operational system, not simply a completed design project.

Sources & further reading

  1. [1]Unauthenticated path traversal in page-template resolution WordPress Security Team · 2026-09-22
  2. [2]WordPress 7.1.2 Release WordPress · 2026-09-22
  3. [3]CVE-2026-87902: Attackers Started Probing WordPress Sites Hours After the Patch Patchstack · 2026-09-22
  4. [4]WordPress security advisory — Update 1 Canadian Centre for Cyber Security · 2026-09-25
  5. [5]WordPress 7.1.4 WordPress · 2026-10-28

Turn technology into business outcomes.

From strategy and business processes to delivery and operations, let’s explore what matters.

Talk to Automize

Related insights