Skip to content
Noroxi
Research8 min read

CVE-2026-87902: WordPress core flaw under attack. Are you affected?

CVE-2026-87902 in WordPress 4.7–7.1.1 lets an attacker with no account include server files and, on some setups, run code. Exploited since day one. Cause, at-risk themes, checks and patched versions.

Noroxi TeamPenetration testing and security consulting

WordPress 7.1.2 shipped on 22 September 2026. The first attack attempt arrived before lunch the same day. By the next morning, ready-made scanning tools were circulating and attack traffic was ten times what it had been that first evening (Patchstack).

The reason is CVE-2026-87902, a flaw in WordPress core itself, not in a plugin or theme. On a site that meets the right conditions, someone with no account and no password can get your server to run their commands. Every WordPress release since 4.7 is affected.

The short version: if you are not on 7.1.2 (or the patched release for your branch, listed below), update today. Read on for what actually goes wrong, which sites are most exposed, how to check yours, and what to look for once you have patched.

What goes wrong

When WordPress renders a page, it picks the template file based on the page's name. For a page called "about", it checks whether the theme has a page-about.php. That name comes from the incoming request, so WordPress cleans it first.

The cleaning is where it breaks. If the name contains ../ (“go up one folder”) written plainly, the filter strips it. Written in encoded form, it slips through, and reappears when WordPress decodes the name at a later step. WordPress then walks out of the theme folder and loads a different PHP file from the server (CWE-98, local file inclusion).

Think of a security guard who checks that a visitor's badge says "floor 3" and waves them in. The badge only decodes in the lift, and it actually says "boiler room".

CVE-2026-87902 WordPress core vulnerability diagram: unauthenticated request, template lookup stepping outside the theme folder, another PHP file being loaded and conditional command execution; where a firewall rule, the WordPress 7.1.2 update and turning off register_argc_argv break the chain, plus patched releases per branch
CVE-2026-87902 step by step: the only measure that breaks the chain for good is the update. The firewall rule and the PHP setting only buy time until you update.

Which sites are most at risk

Two conditions have to line up (WordPress security advisory):

  1. Your theme has a top-level folder whose name starts with page- (for example page-templates). The advisory names the older default themes Twenty Twelve and Twenty Fourteen, plus Neve, Hestia and Sydney. If you use a child theme, check the parent too.
  2. A PHP file useful to the attacker exists on the server. The known technique works when PHP's register_argc_argv setting is on. According to the advisory, it is on in the official PHP Docker image and in default cPanel setups running PHP older than 8.5.

With both in place, the result is remote code execution: someone else running commands on your server. With only the first, files on the server can be read.

Don't take comfort from your theme not being on that list. The list is examples, not a complete inventory, and the attacks don't check your theme first; automated tools simply try every WordPress site they find.

Is your site affected?

Three ways to check:

  • In the dashboard: Dashboard → Updates. Your version is shown there, and if an update is waiting you can run it from the same screen.
  • From the command line (if you have WP-CLI): wp core version
  • From the outside, without logging in to anything: type your domain in the box below.

What is WP Lens? It's Noroxi's free WordPress scanner. You don't install anything or hand over a password: it reads the WordPress version, plugins and theme from what your site already shows publicly, then checks them against more than 30,000 known vulnerabilities across more than 14,000 plugins and themes. It also flags common misconfigurations, such as usernames that can be read from outside or open directory listings. If you hide your version, it will say so; use one of the first two options instead.

You don't have to wait for the next one. The speed of CVE-2026-87902 is no longer unusual: the gap between disclosure and the first attack is now measured in hours. Add your site to a free Noroxi account and WP Lens rescans it on a schedule. When a new vulnerability is published for a plugin, theme or WordPress version you run, you hear about it from us instead of finding it in the news. Create a free account, add your site once, and let the system keep watch. Rather not sign up? Every Monday we send one email with the vulnerabilities exploited that week.

Looking after more than one site, as an agency, a freelancer or an in-house IT team? Add them all to one list, watch them together and report to each site owner under your own name: Noroxi for multiple sites. For sites that hide their WordPress version, paste the plugin list into WP Lens and get results without a single request to the site.

What to do

1. Update today

WordPress backported the fix to every branch back to 4.7. If you can't move to the latest major version, moving to the patched release of your own branch is enough:

Your branchPatched release
7.17.1.2
7.07.0.6
6.96.9.9
6.86.8.10
6.76.7.9
6.66.6.9
6.56.5.12
6.4 and olderSee the full table at the end

If automatic updates are on, you have most likely received it already, but check anyway: automatic updates can fail silently because of file permissions or a plugin.

2. If you can't update right away

If a custom theme or a hosting restriction stops you from updating today, Patchstack suggests two stopgaps:

  • Block path traversal in the page name. In your firewall (WAF) or server rules, reject requests whose pagename value contains an encoded ../. Real page names never contain it, so genuine visitors are unaffected.
  • Turn off register_argc_argv in PHP. It doesn't close the hole, but it breaks the known route to code execution. In Patchstack's words, it is "the difference between an information leak and code execution". You can usually change it in your hosting panel's PHP settings or ask your host.

Both are temporary. The fix is the update.

3. After updating, look for traces

If you updated after 22 September, there is a good chance your site was probed in the meantime. Check:

  • The /tmp and /var/tmp folders: attackers drop their files here. Unfamiliar .php files there mean you should treat the server as compromised.
  • Access logs: requests whose pagename contains an encoded ../, and requests that send pagename and page_id together to the site root or /index.php.
  • Successful (200) responses that return RSS or OPML content from an ordinary page URL: Patchstack gives this as a sign that an inclusion worked.
  • Admin accounts and files: administrators added in recent weeks, modified core files (wp core verify-checksums).

If you find anything: change the database password and the security keys in wp-config.php, rotate any third-party API keys stored there, and consider rebuilding the server from a clean backup.

Not sure?

If you can't tell whether your site was affected or attacked before you patched, or you need to check a number of sites together, get in touch with the Noroxi team. We'll look at it with you.


Record details

RecordCVE-2026-87902
AffectedWordPress core, 4.7.0 – 7.1.1
WeaknessPath traversal leading to local file inclusion (CWE-98); remote code execution under conditions
Privileges neededNone: no account, no password, no user interaction
SeverityCVSS 4.0: 9.2 Critical (WordPress) · CVSS 3.1: 8.1 High (NVD)
Exploited in the wildAdded to CISA's Known Exploited Vulnerabilities catalog on 25 September 2026
Exploit likelihoodEPSS 39%: higher than 98% of all records (18 October 2026)
National advisoryTürkiye Cybersecurity Directorate TR-26-1350, 16 October 2026 · all national advisories
Reported byRobert Ressl

Timeline

DateWhat happened
22 September 2026WordPress 7.1.2 and the security advisory released. First attack attempt seen the same day at 11:49 UTC
23 SeptemberReady-made scanning tools circulating; attack traffic ten times the first evening
25 SeptemberCISA adds the flaw to its exploited-in-the-wild catalog
2 OctoberExploit likelihood (EPSS) peaks at 45%
16 OctoberTürkiye's Cybersecurity Directorate publishes an advisory

Patched releases for every branch

BranchPatchedBranchPatched
7.17.1.25.85.8.17
7.07.0.65.75.7.19
6.96.9.95.65.6.21
6.86.8.105.55.5.22
6.76.7.95.45.4.23
6.66.6.95.35.3.25
6.56.5.125.25.2.28
6.46.4.125.15.1.26
6.36.3.125.05.0.29
6.26.2.134.94.9.33
6.16.1.144.84.8.32
6.06.0.164.74.7.37
5.95.9.18

Sources

This post contains no exploit code and no links to attack tools.

Exploited this week · every Monday

New KEV entries, fresh PoCs, WordPress triage and what to do this week. No account needed.

Your address is used only for this email and never shared.

Up next

AIOS 5.4.9: a 2FA bypass that checks the wrong account