Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2026-87902: Unauthenticated Local PHP File Inclusion in WordPress Core Page-Template Resolution

Published Sep 22, 2026 · Updated 6 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days9 mentions · peak 2 in a dayToday
CVSS8.1High · v3.1
EPSS95.8%100th percentile
CISA KEVYesAdded Sep 25, 2026
In the wildActivePer CISA KEV
Vendor
Wordpress
IdentifiersCVE-2026-87902CWE-98 · Improper Control of Filename for…

CVE-2026-87902 is an unauthenticated path traversal and local PHP file inclusion vulnerability in WordPress Core page-template resolution. A crafted frontend request supplies a double-encoded traversal value through pagename alongside a valid page_id. Subsequent URL decoding in get_page_template() activates traversal syntax when constructing a template candidate. The template-loading pipeline checks the target's existence and readability without adequately enforcing containment within approved theme directories, allowing inclusion of an attacker-selected readable local PHP file. Exploitation depends on the active theme's directory layout and server filesystem access; remote code execution requires additional conditions. The vulnerability affects unpatched WordPress branches beginning with 4.7, with fixes released in WordPress 7.1.2 and branch-specific security backports.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an unauthenticated remote attacker to cause PHP files outside the active theme directories to execute in the WordPress request context. Where a usable local execution gadget or attacker-controlled PHP file is available, this can become arbitrary code execution with the PHP/web-server account's privileges. Consequences can include disclosure of application configuration, database credentials, customer and user records; unauthorized modification of site content and writable application resources; web-shell deployment; and service disruption. Operating-system privilege escalation and root access are not inherent consequences. Exploitation activity has been observed, although counts of matching requests do not establish successful compromise.

Mitigation

If you can’t patch tonight, do this now.

Until patching is complete, deploy WAF controls that detect encoded traversal in pagename across query strings and POST bodies, and restrict public access to affected instances where feasible. Disable unnecessary register_argc_argv support in the web-facing PHP runtime, remove or make inaccessible unused PEAR command entry points, and restrict PHP filesystem read access and write permissions. Where operationally safe, remove or rename the qualifying top-level theme directory to break the demonstrated traversal route. Run PHP with least privilege and segment internet-facing WordPress systems from critical assets. Monitor suspicious template-resolution requests, unexpected PHP files, account changes, and web-worker process activity. These measures reduce exposure or interrupt known execution chains but do not repair the underlying vulnerability; restricting administrative interfaces alone is insufficient.

Remediation

Patch, then assume compromise.

Upgrade to the latest maintained WordPress release containing the fix, or install the security release for the deployed branch. Fixed releases include 7.1.2, 7.0.6, 6.9.9, 6.8.10, and additional branch-specific backports down to 4.7.37. Older branches are not uniformly vulnerable merely because their version numbers are below 7.1.2; verify the exact branch-specific fixed version. Debian 13 installations should install wordpress 6.8.10+dfsg1-0+deb13u1 or a later vendor-fixed package. Apply appropriate distribution updates elsewhere, and verify production, staging, and container deployments individually. The fix validates decoded page names and adds template-path containment checks. Investigate previously exposed installations for compromise because updating does not remove attacker-created files or persistence.

Public exploits

Exploits

16 exploits validated by Mallory's analysis. Hidden: 13 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
CVE-2026-87902This is a standalone Python 3 proof-of-concept and reproduction lab for CVE-2026-87902 / GHSA-7hp8-65ch-5whp. The main entry point, poc.py, uses only the standard library and supports a non-invasive check mode plus an exploit mode. It discovers the active theme and versions, checks the existence of a required page-* theme directory, queries WordPress REST endpoints for a published page, then sends a double-encoded pagename traversal. The claimed flaw is that get_page_template() URL-decodes a pagename-derived template candidate without validate_file(), allowing a page-<directory>/../../ traversal to escape the stylesheet directory and include a chosen .php file. The default inclusion target is wp-admin/install.php, chosen as an observable, non-writing proof; custom PHP paths can be supplied with --include. The repository contains generated core.json asset hashes for WordPress version fingerprinting, themes.json and lab/survey.json describing theme page-directory prerequisites, and a Docker/MariaDB-based lab runner that provisions unmodified WordPress images and validates the PoC across releases/themes. lab/core.py and lab/themes.py regenerate the fingerprint/theme datasets, while a GitHub Actions workflow continuously reproduces selected affected and unaffected cases. No hardcoded victim host, callback server, reverse shell, persistence mechanism, or destructive behavior is present.vulpecuna · Disclosed Sep 22, 2026 · python · json · web · networkOperationalcve-2026-87902-pocThis nine-file repository contains a Python 3 proof of concept and an isolated Docker lab for CVE-2026-87902, an alleged unauthenticated WordPress Core page-template resolution flaw. The primary entry point, `cve-2026-87902.py`, discovers a published Page through the WordPress REST API unless a page ID is supplied, then sends anonymous POST requests with a double-encoded `pagename` traversal. The traversal survives early WordPress pathname sanitization, is decoded later in template selection, and is intended to cause inclusion of a readable PHP file outside allowed theme roots. The script implements a two-stage optional RCE chain: it first includes PEAR's `pearcmd.php` to create a PHP file in a writable directory, then includes that file and checks the response for its marker. `docker-compose.yml`, `lab/Dockerfile`, and `lab/up.sh` build and configure a WordPress 7.0.2/PHP 8.3/Apache plus MySQL 8.4 lab, expose it only on localhost, enable `register_argc_argv`, create the necessary `page-templates` fixture, and provide a root-owned readable `/flag` proof file. The repository is not part of a recognized exploit framework.ressl · Disclosed Sep 22, 2026 · python · bash · web · networkOperationalcve-2026-87902-wordpress-lfi-labThis 16-file repository contains a Python 3 stdlib-only URL-list scanner/PoC, Docker reproduction lab, Bash validation scripts, and captured evidence for CVE-2026-87902 / GHSA-7hp8-65ch-5whp. The primary entry point, `poc/cve-2026-87902-scan.py`, fingerprints WordPress, discovers a published page, and tests a double-encoded `pagename` traversal against `get_page_template()`. It confirms local PHP inclusion by requiring both the OPML output of `wp-links-opml.php` and a clean non-existent-file negative control. It supports concurrent target scanning, JSON/JSONL output, proxies, custom headers, TLS-disable mode, GET/POST probing, and version-aware handling of patched backports. An explicitly gated `--verify-rce --i-have-authorization` mode performs a PEAR `pearcmd.php` write-and-include chain to demonstrate conditional PHP execution. The `lab/` directory builds WordPress 7.1.1 and 7.1.2 side by side on loopback ports 8091 and 8092 with MySQL 8.4; `evidence/` records LFI, RCE, and scanner validation. The repository is not tied to Metasploit, Nuclei, or another exploit framework.dinosn · Disclosed Sep 23, 2026 · python · bash · webOperationalCVE-2026-87902This 11-file repository is an authorized validation lab and exploit toolkit for CVE-2026-87902, an unauthenticated WordPress core page-template path traversal/local file inclusion flaw. The vulnerability is in get_page_template() handling of the pagename query variable: a double-encoded value survives sanitization, is decoded again, and is incorporated into a page-<value>.php template candidate without the older traversal validation. A valid page_id is required to avoid the 404 template path, and exploitation depends on a theme directory whose name begins with page-. The repository includes a Bash Docker lab driver, Docker Compose WordPress/MySQL environment, safe Python PoC and triage tools, a scope-constrained bounty screener, and a Nuclei safe-oracle template. The default verification path only includes harmless core PHP files and matches deterministic output. The --rce PoC mode is opt-in and uses PEAR pearcmd.php to write, run, verify, and remove a one-shot PHP id marker. CI invokes ./lab verify to test a vulnerable WordPress 7.1.1 instance and then a patched 7.1.2 negative control. The code enforces loopback targets by default, requiring an explicit authorization override for non-loopback testing.Hassham1 · Disclosed Sep 23, 2026 · python · bash · web · networkOperationalCVE-2026-87902The repository consists of a README and one Python 3 executable, cve-2026-87902.py. The script is a standalone network exploit tool rather than a framework module and uses only the standard library. It sends raw HTTP requests with http.client to preserve encoded request bodies, discovers WordPress themes/pages, detects WAF indicators, tests traversal depth, and supports application/x-www-form-urlencoded or multipart/form-data request bodies. Its claimed primitive is a POST pagename double-encoding bypass that escapes a page-* theme template directory and causes inclusion of attacker-selected PHP paths. Default LFI probes target wp-config, wp-includes/version, index, and wp-load, while user-supplied paths may be added with -f. The optional PEAR chain attempts to include one of several pearcmd.php locations, invoke PEAR config-create through crafted query-string argv values, write a PHP shell payload to a writable location, and include that payload for command execution. Commands are user controlled through --rce, and --read maps to a cat command. The repository contains no bundled external payload binary, persistence mechanism, C2 endpoint, or destructive behavior. The CVE/version claims are repository assertions; the code is an operational exploit implementation but successful exploitation depends on the listed WordPress, template, PHP/PEAR, and filesystem prerequisites.bhideki · Disclosed Sep 23, 2026 · python · markdown · webOperationalCVE-2026-87902-ToolkitThe repository contains two standalone Python command-line tools plus documentation and dependency metadata. exploit.py is the offensive component: it normalizes single or bulk HTTP(S) targets, fingerprints WordPress, extracts versions, tests theme-directory prerequisites, probes a claimed double-encoded pagename traversal/LFI flaw, and searches several local PEAR command locations. Its documented escalation chain includes pearcmd through LFI, uses PEAR config-create to write PHP, and includes the generated file to obtain code execution. The script also contains post-exploitation capabilities for configuration/file retrieval, webshell placement, administrator creation, reverse-shell use, multithreaded target processing, proxy support, logging, SQLite/structured reporting, and CSV/JSON-style output. safecheck.py is a companion defensive scanner that performs version, theme, and PEAR-risk assessment without the payload/persistence functions and emits mitigation recommendations. No external repository URL, revision, archive path, or archive size was supplied. The CVE and vulnerability claims are represented as stated by the repository content and should be independently validated before relying on them.tc4dy · Disclosed Sep 23, 2026 · python · web · networkOperationalwordpress-cve-2026-87902This nine-file repository is an operational proof-of-concept for claimed CVE-2026-87902, an unauthenticated conditional local file inclusion in the WordPress page-template loader's `pagename` handling. `exploit-pear.py` and `exploit-pecl.py` are standalone Python HTTP clients. Both use a double-encoded traversal beginning at `templates/` to reach absolute paths, iterate through common PEAR/PECL command-script locations, invoke `config-create` to write a short PHP command shell into `/tmp`, and then re-include the temporary file to run a command supplied in `_`. Although their usage comments show positional arguments, the scripts do not parse command-line arguments: they currently use hard-coded values of `http://127.0.0.1:18092`, page ID `2`, and command `id` unless edited. The README documents equivalent curl requests and an optional reverse shell. The `docker/` directory supplies a reproducible WordPress/MySQL lab: Compose runs WordPress 7.1.1 with a custom classic PHP theme and initializes it via WP-CLI, while the Dockerfile separately references WordPress 7.0.2 but is not used by the Compose service. This is not part of a recognized exploit framework.nextco · Disclosed Sep 24, 2026 · python · php · web · networkOperationalCVE-2026-12227-visualcomposer-lfi-pocThis nine-file repository is an authorized validation lab and exploit/verification toolkit for CVE-2026-12227, an unauthenticated local file inclusion flaw in Visual Composer Website Builder page-template handling. Its core defect is validate-then-mutate logic: validate_file() examines the raw vcv-template value, then all 'theme:' strings are stripped before locate_template() resolves the result. The supplied '.theme:./' fragments contain no literal '..' before validation but become '../' traversal segments after stripping. The primary executable PoC is poc/poc_cve_2026_12227.py. It fingerprints WordPress through /feed/ and Visual Composer through its public readme.txt, restricts use to loopback by default, and sends POST probes over homepage and page_id anchors, depths 3-6, using safe wp-links-opml.php and xmlrpc.php output oracles. It confirms successful inclusion and PHP execution but does not place files, execute commands, or implement an RCE payload. The included Nuclei template implements the same POST oracle technique with 20 request variants, redirects enabled, and stop-at-first-match behavior. The Bash lab driver and docker-compose.yml create a loopback-only Docker matrix using MySQL and WordPress. It downloads Visual Composer 45.16.1/45.16.3, provisions a theme and test page, and creates a lab-only uploads/mk-12227.php execution marker. The matrix demonstrates exploitation on WordPress 7.1.1 with Visual Composer 45.16.1 and 45.16.3, versus a silent result on WordPress 7.1.2. The repository attributes the latter to WordPress CVE-2026-87902's locate_template containment gate, which masks rather than fixes the Visual Composer code path. CI runs ./lab verify and then tears the lab down.Hassham1 · Disclosed Sep 24, 2026 · Framework: nuclei · python · bash · web · networkOperationalCVE-2026-87902This three-file repository contains an operational Python 3.6+ exploit for the claimed CVE-2026-87902 WordPress template-resolution flaw, a Docker Compose lab, and Portuguese-language documentation. The main entry point, exploit_locate_template_rce.py, uses only Python standard-library modules. It sends anonymous POST requests with page_id and a double-URL-encoded pagename traversal value. The page_id is intended to force resolution of a real published page while preserving the malicious pagename; late URL decoding in get_page_template()/locate_template() then causes a template candidate to escape the active theme directory. The script's first stage is a non-writing differential LFI check: baseline and nonexistent-target requests should return normal content, while inclusion of wp-content/index.php should return an empty body. It tests candidate theme directories page-templates and page-template and traversal depths up to 12. On a positive result, unless --validate-only is used, it attempts RCE by including a local pearcmd.php candidate. It deliberately uses raw HTTP request-target handling so a '+'-separated query string is interpreted as PEAR argv, invokes PEAR config-create to write a quote-free generated PHP payload, and subsequently includes that file to run a configurable command. No fixed external C2, attacker IP, or hard-coded victim URL is present; the target base URL is operator supplied. docker-compose.yml provisions MariaDB 11 and wordpress:7.1.1-php8.3-apache, exposes WordPress on host port 8080, and mounts a page-templates directory into the Twenty Twenty-Five theme to satisfy the traversal prerequisite.crowsec-edtech · Disclosed Sep 25, 2026 · python · yaml · web · networkOperationalCVE-2026-87902_PoCThis three-file repository contains a Python 3 exploit, a minimal README, and a Docker Compose lab targeting WordPress 7.1.1 with MariaDB. The exploit targets CVE-2026-87902, described as an insufficient path-traversal restriction in WordPress get_page_template()/locate_template() before 7.1.2. It combines double-encoded traversal in pagename with a valid page_id so WordPress loads a real page while the template name later decodes to a path outside the theme. Detection probes a traversal path to wp-content/index without performing payload writes. In RCE mode, it attempts several pearcmd filesystem paths, preserves a deliberately raw PEAR-style query string, uses PEAR config-create to write a quote-free PHP stager, and includes the resulting file to execute a user-selected command. The script can discover a page, accepts a manually supplied page ID, supports TLS-verification bypass, configurable theme/PEAR/output paths, timeout, and verbose operation. It is standalone rather than a recognized exploit-framework module.khellwan · Disclosed Sep 25, 2026 · python · yaml · webOperationalCVE-2026-87902The repository contains a README and one substantial Python 3 exploit program, majestic666.py. It is a standalone interactive/batch exploitation utility, not a known exploitation framework module. The program claims CVE-2026-87902 in WordPress Core <= 7.1.1: an unauthenticated pagename traversal through locate_template() is used first to include WordPress OPML content and validate LFI, then to include PEAR pearcmd.php. It supplies PEAR config-create arguments intended to write a randomized PHP system() webshell into wp-content and confirms execution with id. The implementation includes WordPress version discovery from multiple public sources, OPML-based false-positive filtering, traversal-depth and PEAR-path sweeps, webroot inference plus a large hardcoded webroot list, WAF body-padding logic, concurrent batch operation, target-file live tailing, and an interactive post-exploitation command loop. There are no hardcoded external C2 servers, IPs, or domains; all remote targets are operator supplied.rwxrwxs · Disclosed Sep 26, 2026 · python · markdown · web · networkOperationalCVE-2026-87902The repository contains a single standalone Python 3 exploit tool, CVE-2026-87902.py, plus a Markdown README. It is not part of an identified exploit framework. The Python program uses requests with TLS-certificate verification disabled, an 8-second timeout, and up to 200 concurrent workers for mass scans. It presents an interactive menu for single-target or file-based LFI scanning, with optional RCE attempts and an operator-provided command. The tool is designed to fingerprint WordPress through generator metadata, feeds, OPML, readme/asset-version indicators, and WordPress-specific content markers. It attempts to identify a usable published page ID, active theme details, and page-* theme directories before issuing a traversal payload in the pagename parameter. LFI validation relies primarily on recognizable response content from wp-links-opml.php and can optionally use additional WordPress endpoints as response oracles. The claimed escalation path tests common system and cPanel PEAR pearcmd.php locations, requiring register_argc_argv and a readable PEAR utility to write and execute PHP through the LFI primitive. The README documents the claimed CVE, affected-version range, conditions, remediation guidance, and usage. The exploit claims should be independently validated against authoritative WordPress advisories before operational use; the repository itself provides a functioning exploit-oriented scanner and an attempted PEAR command-execution escalation rather than merely a vulnerability detector.langz337 · Disclosed Sep 27, 2026 · python · markdown · webOperationalCVE-2026-87902-exploitThe repository contains a single substantial Python 3 exploit program (exploit.py), a Spanish README, and a standard Python-oriented .gitignore. It is a standalone, standard-library-only web exploit rather than a Metasploit, Nuclei, or other framework module. The script implements an HTTP(S) client with retries, gzip handling, optional proxying, TLS verification disabling, keep-alive connections, and threaded work support. It targets an alleged unauthenticated WordPress template traversal in get_page_template(), using the public pagename value and a real page-* theme directory as a traversal anchor. It discovers a published page, validates/calibrates the LFI path, and can stop in read-only validation mode. For RCE, it searches for an includable PEAR pearcmd.php path, abuses its config-create behavior to create a PHP polyglot, then executes a user-selected command and can provide an interactive console. The README documents that the LFI can remain useful for reading PHP files, including WordPress database credentials and salts from wp-config.php, even when PEAR-based execution is unavailable.Maalfer · Disclosed Sep 27, 2026 · python · markdown · web · networkOperationalCVE-2026-87902This is a standalone, standard-library Python/Tkinter GUI exploit tool, not a Metasploit, Nuclei, or other framework module. The repository contains four files: licensing and ignore metadata, a detailed README, and the 55 KB xwp_gui.py application. The Python application implements concurrent single-target and URL-list scanning, WordPress/version/theme fingerprinting, page-ID discovery through REST routes, sitemaps, and page markup, and a check-only LFI validation mode based on OPML response content. Its exploitation workflow constructs double-encoded pagename traversals from candidate theme template directories, tests PEAR pearcmd gadget paths at multiple traversal depths, uses the PEAR config-create technique to write executable PHP, runs a configurable command, and optionally deploys an embedded PHP file manager. Results can be displayed in the GUI and exported as CSV. The claimed target is WordPress Core CVE-2026-87902 / GHSA-7hp8-65ch-5whp; the supplied repository presents this as an unauthenticated path-traversal/LFI issue escalated via PEAR.tonydelouvre · Disclosed Sep 29, 2026 · python · php · web · network · fileOperationalcve-2026-87902The nine-file repository packages a standalone Python exploit with a Docker-based WordPress laboratory. It includes one Python script, one POSIX shell setup script, two PHP theme templates, one CSS file, a Compose manifest, documentation, ignore rules, and an empty directory placeholder. No exploit framework is identified. The documented chain uses double-encoded traversal in the pagename parameter to escape theme directories during page-template resolution, include pearcmd.php, write PHP-bearing PEAR configuration output, and include that output in a second anonymous POST request. Visible code provides byte-preserving HTTP/HTTPS requests, optional TLS verification bypass, double encoding, quote-free PHP string generation, page-selection logic, traversal-depth retries, and response-marker checks. However, the supplied Python file is explicitly truncated, omitting the central request-building and payload functions; exploit validity and the claimed CVE, affected versions, and fixes cannot be independently confirmed from this material. There is no visible indication of a fake exploit, reverse shell, or attacker-controlled callback. Compose provisions WordPress 7.0.2 with PHP 8.3/Apache, MySQL 8.4, and WP-CLI. setup.sh installs WordPress, activates the fixture theme, creates a published page, removes other pages, writes /flag, and checks prerequisites. Its CLI PHP setting check does not independently prove the web SAPI configuration. Operational issues include weak lab credentials, HTTP published without a loopback-only binding, and a Compose project-name mismatch: setup.sh specifies cve87902lab while the README startup command does not. Original repository URL, git reference, and archive size were not supplied; empty strings and zero represent unavailable metadata.xiaxiu555 · Disclosed Oct 7, 2026 · python · shell · web · networkOperationalCVE-2026-87902This 12-file repository is a self-contained local proof-of-concept and Docker lab for CVE-2026-87902, an alleged unauthenticated local file inclusion issue in WordPress Core template resolution. The main Python entry point, CVE-2026-87902-Abraxas-Labs.py, sends HTTP GET requests to a supplied base URL and page ID. Its attack request supplies a double-URL-encoded traversal sequence in pagename, intended to escape the active theme's template directory and include wp-content/uploads/ghsa7hp8-witness.php. It does not provide a shell, command execution payload, persistence, credential theft, or scanning functionality; its sole included payload is a PHP marker file used as an inclusion oracle. The lab directory contains Docker Compose infrastructure for wordpress:7.1.1-php8.2-apache and MySQL 8.0, bound at 127.0.0.1:18092, plus a Bash setup script. The setup installs WordPress, activates a minimal classic PHP theme with page-templates/, creates a published page if needed, writes the witness PHP file to uploads, and invokes the Python PoC. Minimal PHP theme files and witness.php support reproducible validation. The Python code checks both a normal control request and a direct witness request to distinguish the intended WordPress template-loader inclusion from ordinary direct access. No exploit framework is used.abraxas · Disclosed Sep 22, 2026 · python · bash · web · networkPoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
WordpressWordpressapplication
FAQ

Frequently asked questions

Is CVE-2026-87902 exploited in the wild?
Yes. As of Nov 18, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Sep 25, 2026.
Is there a public exploit for CVE-2026-87902?
Yes. Mallory tracks 16 public exploits or proofs of concept for CVE-2026-87902, the earliest disclosed Sep 22, 2026.
Is there a patch for CVE-2026-87902?
Upgrade to the latest maintained WordPress release containing the fix, or install the security release for the deployed branch. Fixed releases include 7.1.2, 7.0.6, 6.9.9, 6.8.10, and additional branch-specific backports down to 4.7.37.
What products are affected by CVE-2026-87902?
Wordpress.
How severe is CVE-2026-87902?
CVE-2026-87902 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 95.8% (100th percentile) as of Nov 18, 2026.
Activity feed

Recent activity

351 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+18 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signatures2YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity176Community discussion across Reddit, Mastodon, and other social sources.