Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-87902 — Proof-of-concept and disclosure pack for CVE-2026-87902, an unauthenticated local file inclusion in WordPress Core via locate_template(), with a loopback lab and patch guidance. | Kitploit
Tools/GitHubGitHub/abraxas/cve-2026-87902
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb SecurityPenetration TestingLabs & Practice
GitHubabraxas/cve-2026-87902

CVE-2026-87902

Proof-of-concept and disclosure pack for CVE-2026-87902, an unauthenticated local file inclusion in WordPress Core via locate_template(), with a loopback lab and patch guidance.

View Repository
31122h 16m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Abraxas Labs — CVE-2026-87902 — WordPress

abraxaslabs.tech  ·  github.com/abraxas  ·  @abraxas_null  ·  CVE-2026-87902

CVE-2026-87902 — WordPress

WordPress — WordPress Core 7.1.1 — WordPress

WordPress Core is vulnerable to Local File Inclusion via the locate_template() function in various versions up to, and including, 7.1.1.

CVECVE-2026-87902 · CVE.org
CWECWE-98
CVSSHigh: 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
ProductWordPress Core
Affectedall versions through 7.1.1 (inclusive)
Patched7.1.2 and later
Authunauthenticated (see source map)
LicenseGNU Affero GPL v3.0
Lab127.0.0.1 only · vendor/client disclosure pack, not a scanner

Advisory (from the source map)

wp-includes/template.php get_page_template + locate_template on 7.1.1. Patch 7.1.2 _wp_is_template_path_allowed and validate_file on decoded pagename.


Entry

  • Method: GET
  • Path: /?page_id={id}&pagename=templates%252F%252e%252e%252F%252e%252e%252F%252e%252e%252Fuploads%252Fghsa7hp8-witness
  • Router: Unauthenticated front-end page query. get_page_template() builds page-{$pagename}.php from urldecoded pagename. locate_template() concatenates onto the theme directory without a jail.
  • Notes: CVE-2026-87902 CWE-98 WordPress <= 7.1.1 unauth LFI. Witness: GHSA7HP8-WITNESS and wp_version=7.1.1 in the page response. Not a reverse shell. Not pearcmd.

Call chain

  • GET /?page_id=&lt;published page&gt;&pagename=&lt;double-encoded templates/../../../uploads/ghsa7hp8-witness&gt;
  • WP_Query parse_query is_page from page_id; get_posts replaces WHERE with ID=page_id
  • get_page_template urldecode pagename then page-{$pagename}.php
  • locate_template file_exists(stylesheet_path + '/' + template_name) no jail
  • template-loader realpath + include

Lab preconditions

  • WordPress 7.1.1 (or any affected branch before the 7.1.2 backports)
  • classic theme with a top-level directory named page-* (page-templates)
  • readable local .php target (lab: wp-content/uploads/ghsa7hp8-witness.php)

Witness

Unauthenticated 200 body contains GHSA7HP8-WITNESS and wp_version=7.1.1. Control GET /?page_id=N does not.

Not success

  • witness only on a direct GET of the uploads PHP file (wp_version=none)
  • reverse shell
  • pearcmd.php gadget

Patch / remediation

Do this first: Update WordPress Core to 7.1.2 or newer.

Verify after upgrade

  • Re-run CVE-2026-87902-Abraxas-Labs.py against the patched build: the mapped witness must not appear.
  • Confirm the vendor advisory / changeset in the deployed tree (see references).
  • A WAF signature is delay, not a patch.

If you cannot update immediately

  • Disable or isolate the affected component.
  • Hunt for the witness condition on production (new privileged users, unexpected files, injected rows — whatever this CVE's map names).

Reproduction (authorized lab)

Target only http://127.0.0.1:8088 (or the loopback you bound). Do not point this script at the internet.

root@kitploit:~
python3 CVE-2026-87902-Abraxas-Labs.py

Success is the witness above in the response body. Generic 200 HTML is not it.


Lab images

Loopback stack used to reproduce. Official images unless a Dockerfile in this folder builds from source.

  • lab/docker-compose.yml
  • lab/Dockerfile
root@kitploit:~
cd lab
docker compose up --force-recreate

Bind the vulnerable product tree next to Compose if the YAML mounts a local directory (plugin zip / source tag from the version table). Publish nothing except 127.0.0.1.


References

  • CVE-2026-87902 · NVD

  • CVE-2026-87902 · CVE.org

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

  • www.wordfence.com/threat-intel/vulnerabilities/wordpress-core/wordpress-core-711-unauthenticated-local-file-inclusion-via-locate-template-path-traversal

  • www.cve.org/CVERecord?id=CVE-2026-87902

  • Abraxas Labs: abraxaslabs.tech · github.com/abraxas · @abraxas_null


Records (structured)

root@kitploit:~
# CVE-2026-87902 / GHSA-7hp8-65ch-5whp

CWE: CWE-98
CVSS: High 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H (Wordfence). GitHub advisory: Critical.

## Description

An unauthenticated attacker can make `get_page_template()` page-template resolution include a chosen readable local `.php` file outside the active theme directories. `locate_template()` in WordPress <= 7.1.1 concatenates the caller-supplied template name onto the theme path and does not verify the result stays inside the theme. The core-reachable vector is the url-decoded `pagename` query variable. WordPress 7.1.2 adds `_wp_is_template_path_allowed()`.

## Product

WordPress 7.1.1 (fixed in 7.1.2, backported through 4.7.37). Lab oracle is LFI of a witness PHP file, not RCE.

License

This disclosure pack is licensed under the GNU Affero General Public License v3.0. See LICENSE.


Disclaimer

This pack is for the vendor, the site owner, and licensed labs. The script talks to 127.0.0.1. Using it against systems you do not own is not authorized by Abraxas Labs. No warranty.

abraxaslabs.tech · github.com/abraxas · @abraxas_null

Download Tool