
Proof-of-concept e pacchetto di divulgazione per CVE-2026-87902, un'inclusione di file locale non autenticata in WordPress Core tramite locate_template(), con un laboratorio loopback e indicazioni per la patch.
abraxaslabs.tech · github.com/abraxas · @abraxas_null · CVE-2026-87902
WordPress — WordPress Core 7.1.1 — WordPress
WordPress Core è vulnerabile a Local File Inclusion tramite la funzione locate_template() in varie versioni fino alla 7.1.1 inclusa.
| CVE | CVE-2026-87902 · CVE.org |
| 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 |
| Prodotto | WordPress Core |
| Affetto | tutte le versioni fino alla 7.1.1 (inclusa) |
| Corretto | 7.1.2 e successive |
| Auth | non autenticato (vedi source map) |
| Licenza | GNU Affero GPL v3.0 |
| Lab | solo 127.0.0.1 · pacchetto di disclosure per vendor/client, non uno scanner |
wp-includes/template.php get_page_template + locate_template sulla 7.1.1. Patch 7.1.2 _wp_is_template_path_allowed e validate_file sul pagename decodificato.
GET/?page_id={id}&pagename=templates%252F%252e%252e%252F%252e%252e%252F%252e%252e%252Fuploads%252Fghsa7hp8-witnessGET /?page_id=<published page>&pagename=<double-encoded templates/../../../uploads/ghsa7hp8-witness>WP_Query parse_query is_page da page_id; get_posts sostituisce WHERE con ID=page_idget_page_template urldecode pagename poi page-{$pagename}.phplocate_template file_exists(stylesheet_path + '/' + template_name) senza jailtemplate-loader realpath + includeIl body 200 non autenticato contiene GHSA7HP8-WITNESS e wp_version=7.1.1. Il controllo GET /?page_id=N no.
Fai questo prima: Aggiorna WordPress Core alla 7.1.2 o successiva.
Verifica dopo l'aggiornamento
CVE-2026-87902-Abraxas-Labs.py contro la build corretta: il witness mappato non deve apparire.Se non puoi aggiornare immediatamente
Target solo http://127.0.0.1:8088 (o il loopback su cui hai fatto il bind). Non puntare questo script verso internet.
python3 CVE-2026-87902-Abraxas-Labs.py
Il successo è il witness sopra nel body della risposta. Un generico HTML 200 non lo è.
Stack loopback usato per la riproduzione. Immagini ufficiali a meno che un Dockerfile in questa cartella non compili dal sorgente.
cd lab
docker compose up --force-recreate
Collega l'albero del prodotto vulnerabile accanto a Compose se lo YAML monta una directory locale (zip del plugin / tag del sorgente dalla tabella delle versioni). Non pubblicare nulla tranne 127.0.0.1.
# 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.
Questo pacchetto di disclosure è rilasciato sotto la GNU Affero General Public License v3.0. Vedi LICENSE.
Questo pacchetto è destinato al vendor, al proprietario del sito e ai lab autorizzati. Lo script comunica con 127.0.0.1. Usarlo contro sistemi di cui non sei proprietario non è autorizzato da Abraxas Labs. Nessuna garanzia.