WordPress core CVE-2026-87902 exploited (KEV): update to 7.1.2 now
Every site running WordPress before 7.1.2 or before its branch's backported fix must update immediately because CISA has confirmed active exploitation. You also need to check whether the active theme meets the conditions.
1-minute summary
- Symptom / problem
- ผู้โจมตีที่ไม่ล็อกอินทำให้ get_page_template() include ไฟล์ .php ในเครื่องที่อยู่นอกธีม จนรันโค้ดได้เมื่อเงื่อนไขครบ
- Who should read
- WordPress 7.1.0 ถึง 7.1.1 และสายเก่าทุกสายที่ยังไม่ถึงรุ่นแก้ โดยเสี่ยงจริงเมื่อธีมมีโฟลเดอร์ชื่อขึ้นต้น page- และเครื่องมีไฟล์ PHP ที่เว็บอ่านได้
- Fix in short
- อัปเดตเป็น 7.1.2 หรือรุ่น backport ของสายนั้น ตรวจธีมกับ register_argc_argv และตรวจหาร่องรอยหลังอัปเดต
I noticed a new entry in CISA KEV on 25 Sep. 2026 called "WordPress Core Remote File Inclusion Vulnerability" for CVE-2026-87902, so I went back and read all three original sources: the WordPress 7.1.2 release announcement, the project's GitHub security advisory and the NVD record. The KEV title and the advisory title do not quite match, and this affects core rather than a plugin, so avoiding additional installations will not sidestep it.
What happened
According to the advisory, an unauthenticated attacker can make get_page_template(), the function that selects a page's template file, include a .php file readable by the web server that is outside the active theme directory. The vulnerability is classified as CWE-98, and the advisory calls it "Unauthenticated path traversal in page-template resolution leading to conditional RCE", while CISA calls it Remote File Inclusion. Whatever the name, I think the effect to remember is "including a local file may execute code".
The word conditional matters: not every site running an unpatched version can be taken over immediately. The advisory says both conditions must be met.
- The active theme (child or parent) has a top-level directory whose name begins with
page-. The advisory gives Twenty Twelve, Twenty Fourteen and third-party themes such as Neve, Hestia and Sydney as examples. - A
.phpfile exists locally and is readable by the web server account. The advisory gives PEAR'spearcmd.phpwithregister_argc_argvset to On as an example, and states that the officialphpDocker image and cPanel defaults (PHP before 8.5) meet this condition.
CISA added CVE-2026-87902 to KEV on 25 Sep. 2026, meaning there is evidence of this vulnerability being used against real targets, beyond theory. Treat any site still running an unpatched version as immediately at risk.
Severity
The figures differ between sources, so I have listed them separately.
| Source | Score | Notes |
|---|---|---|
| Project's GitHub advisory | CVSS v4.0 = 9.2 Critical | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| NVD (secondary source) | CVSS v3.1 = 8.1 High | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| WordPress project (7.1.2) | Critical | The announcement only states that there is one critical vulnerability. |
| CISA KEV | Actively exploited | Added 25 Sep. 2026; remediation due 28 Sep. 2026 |
The two scores use different systems (v4.0 and v3.1), and both vectors reflect the conditions: v3.1 sets AC:H, while v4.0 sets AT:P (a prerequisite exists). I am not judging which side is right; in practical terms, if the conditions are met, the whole system is at risk without the attacker needing any account at all. If the conditions are not met, that is still no reason to leave it unpatched, because CISA considers it actively exploited.
CISA's KEV requirements (as cited by NVD) are to apply vendor mitigations in accordance with BOD 26-04, perform forensics triage and discontinue use of the product if no mitigations are available, while also assessing whether the system is exposed to the internet. These requirements primarily apply to US government agencies, but there is no harm in using them as your own benchmark.
Affected and fixed versions
In the timeline I put together from the original sources, version 7.1.1 (17 Sep.) is still affected, while 7.1.2 (22 Sep.) specifically fixes this issue, and the project states that the fix was backported to every eligible branch down to 4.7.
| Branch in use | Affected range | Fixed version |
|---|---|---|
| 7.1 | 7.1.0 through 7.1.1 | 7.1.2 |
| 7.0 | 7.0.0 through 7.0.5 | 7.0.6 |
| 6.9 | 6.9.0 through 6.9.8 | 6.9.9 |
| 6.8 | 6.8.0 through 6.8.9 | 6.8.10 |
| 6.7 | 6.7.0 through 6.7.8 | 6.7.9 |
| 6.6 | 6.6.0 through 6.6.8 | 6.6.9 |
| 6.5 | 6.5.0 through 6.5.11 | 6.5.12 |
| 6.4 | 6.4.0 through 6.4.11 | 6.4.12 |
| 6.3 | 6.3.0 through 6.3.11 | 6.3.12 |
| 6.2 | 6.2.0 through 6.2.12 | 6.2.13 |
| 6.1 | 6.1.0 through 6.1.13 | 6.1.14 |
| 6.0 | 6.0.0 through 6.0.15 | 6.0.16 |
| 5.9 down to 4.7 | All versions before the fixed release for that branch | 5.9.18, 5.8.17, 5.7.19, 5.6.21, 5.5.22, 5.4.23, 5.3.25, 5.2.28, 5.1.26, 5.0.29, 4.9.33, 4.8.32, 4.7.37 |
How to fix it
- Check versions on every site and every container running WordPress, including old, unmaintained sites
- Update to the fixed release for the branch in use, then verify checksums
- Check the conditions: themes with page-* directories, register_argc_argv and pearcmd.php
- Look for traces, especially on sites exposed to the internet since 22 Sep. that remain unpatched
The only remedy the advisory gives is to update; it lists no workarounds. I have therefore separated the additional measures and made it clear that they are not a fix.
# เช็กรุ่น แล้วอัปเดตเฉพาะ minor/security ในสายเดิม
wp core version
wp core update --minor
wp core verify-checksums
If you are on the 7.1 branch and want to move straight to the latest version, check wp core check-update first. Hosts using the php Docker image need to rebuild the image and redeploy, rather than edit files inside the running container.
The advisory does not confirm these measures as project workarounds. I am basing them only on the conditions it describes. Disabling register_argc_argv and removing pearcmd.php from hosts that do not use PEAR helps close the single path given as an example in the advisory, but the file inclusion vulnerability remains until you update.
# ธีมที่ใช้อยู่มีโฟลเดอร์ระดับบนชื่อ page-* หรือไม่
find /var/www/example.com/wp-content/themes -maxdepth 2 -type d -name 'page-*'
# มี pearcmd.php ในเครื่องหรือไม่
find / -name pearcmd.php -not -path '*/proc/*' 2>/dev/null
; php.ini ของ FPM/Apache (CLI เปิดค่านี้เสมอ เลยดูจาก CLI ไม่ได้)
register_argc_argv = Off
Check whether you have been compromised
The advisory and the 7.1.2 announcement provide no IOCs, so I will not invent request patterns. What you can actually check for are the usual results of an RCE attack.
- Run
wp core verify-checksumsandwp plugin verify-checksums --allto find files that differ from the originals. - Run
wp user list --role=administratorto look for administrators you did not create. - Look for new
.phpfiles inwp-content/uploads, where they should not normally exist:find wp-content/uploads -name '*.php' -newermt '2026-09-17' - Review access logs from 22 Sep. onward for unusual web requests or traffic spikes, then compare them with the times suspicious files appeared on the host.
- If the site has been exposed to the internet and running a version below the fixed release since 22 Sep., treat it as at risk. Check the database password and salts in
wp-config.phpif you find traces of compromise.
My take
I would not leave this until the monthly update cycle, even though its conditions are narrower than the name "RFI" suggests, because CISA has confirmed exploitation, and the official Docker image and cPanel defaults mentioned in the advisory are widely used. If you have not updated since 22 Sep., treat this as urgent work to finish before anything else, then work through the themes and register_argc_argv afterward as staffing allows.
P.S. Some news reports give different dates for CISA's deadline, but the NVD record I opened myself states that it was added to KEV on 25 Sep., with remediation due on 28 Sep. 2026. Those are the dates I am using.
Sources: GitHub security advisory GHSA-7hp8-65ch-5whp (https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp), WordPress 7.1.2 Release (https://wordpress.org/news/2026/09/wordpress-7-1-2-release/), WordPress 7.1.1 (https://wordpress.org/news/2026/09/wordpress-7-1-1-maintenance-and-security-release/), NVD CVE-2026-87902 (https://nvd.nist.gov/vuln/detail/CVE-2026-87902), CISA KEV Catalog (https://www.cisa.gov/known-exploited-vulnerabilities-catalog). Information current as of 5 Nov. 2026. I will come back and update this if more details about the attacks become available.
Want us to set this up?
Get help with server setup, configuration, migration, or troubleshooting. Save time for the work that matters.
Hit something like this? Stuck somewhere?
Come trade notes on the LinuxThai board



Comments 0
No comments yet — be the first