AZSecureby Azguards Technolabs

Security bulletins · WordPress.org

WordPress 7.1.2: anonymous file inclusion leading to code execution (CVE-2026-87902)

A visitor without an account can make WordPress load a PHP file from elsewhere on the server. With the right theme and server setup that becomes code execution.

Critical · CVSS 9.2Exploited (CISA KEV)WordPress

Free website scan

Is your store serving malware right now?

Checks home, product, cart and checkout pages, blocklists, exposed files and spam shown only to Google. Takes about a minute.

What happened

A crafted page-template path made get_page_template() include a local .php file. Two conditions turn this into running the attacker's code: the active theme has a top-level folder whose name starts with "page-" (Twenty Twelve, Twenty Fourteen, Neve, Hestia and Sydney were named), and the server has a usable PHP file such as PEAR's pearcmd.php with register_argc_argv turned on.

Patchstack saw probing within hours of the patch and files being written the next day. CISA added the CVE to its Known Exploited Vulnerabilities catalog on 25 September 2026.

What to do

  1. Update WordPress to 7.1.4, or the latest release on your branch.
  2. Turn off register_argc_argv for web PHP and remove PEAR if nothing uses it. This lowers the risk but doesn't replace the update.
  3. Look for PHP files dropped since September and administrator accounts you don't recognise.

Not sure if your site is affected?

The free scan looks at your site from outside: what it runs, exposed files, injected scripts and known malicious domains. It can't read your exact patch level. A deep scan can: it checks the installed versions and packages against this bulletin and looks for what attackers leave behind.

Patched late, or not sure when?

A deep scan checks your server with read-only access, and an Azguards engineer signs off the report.