☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N 🐛 CWE-548
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-6821

CVE-2023-6821 Information Disclosure in Bestwebsoft
📅 PUBLISHED: 2024-03-18 19:05 UTC 🔄 UPDATED: 2026-08-13 10:06 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.22%
👁️
0.22% probability
5.4× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1083
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: N Integrity None
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-6821 is a directory listing vulnerability in the Error Log Viewer by BestWebSoft WordPress plugin, affecting versions prior to 1.1.3. This flaw allows unauthenticated remote attackers to list and read PHP error log files stored on the server, potentially exposing sensitive information such as database credentials, file paths, and internal server configurations. The vulnerability is classified as a CWE-548: Exposure of Information Through Directory Listing and is trivial to exploit, requiring no authentication or special privileges. Given the widespread use of WordPress and the plugin's purpose (viewing error logs), this issue poses a significant information disclosure risk, especially in shared hosting environments.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin from the WordPress dashboard or via direct download are affected. The plugin is not distributed via NPM, PyPI, Go, or Ruby ecosystems. The supply chain risk is limited to the plugin's update mechanism; users must manually update or rely on WordPress's automatic update feature to receive the patched version (1.1.3).

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
  • Base Score: 5.3 (Medium)
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – Unauthenticated access.
  • User Interaction: None (UI:N) – No user action needed.
  • Scope: Unchanged (S:U) – Vulnerability does not affect other components.
  • Confidentiality Impact: Low (C:L) – Limited information disclosure (log files).
  • Integrity Impact: None (I:N) – No data modification.
  • Availability Impact: None (A:N) – No denial of service.

Threat Level: Medium. While the CVSS score is moderate, the ease of exploitation and potential for sensitive data leakage (e.g., database credentials, stack traces) elevates the real-world risk, especially in production environments.

Deep Dive & Mechanics

The Error Log Viewer by BestWebSoft plugin provides a WordPress admin interface to view PHP error logs. The vulnerability stems from the plugin's failure to restrict directory listing on the log storage directory. By default, the plugin stores logs in a publicly accessible directory (e.g., /wp-content/uploads/error-log-viewer/). Without proper access controls, an unauthenticated attacker can directly browse to this directory and list all files, including PHP error logs.

Root Cause: The plugin does not implement an index.php file or .htaccess rules to prevent directory listing. Additionally, it fails to verify user capabilities before serving log files.

Attack Flow:

  1. Attacker identifies a WordPress site running the vulnerable plugin.
  2. Attacker navigates to /wp-content/uploads/error-log-viewer/ (or similar path).
  3. The web server returns a directory listing showing all log files (e.g., error.log, debug.log).
  4. Attacker clicks on a log file to download or view its contents.
  5. Log files may contain sensitive data such as database connection strings, API keys, file paths, or user information.

Affected Component: The plugin's file serving mechanism does not enforce authentication or authorization checks.

Vulnerable vs. Patched Code

Vulnerable Code (version < 1.1.3): The plugin likely used a simple file read function without access control. For example:

// Vulnerable: No capability check
function elv_read_log() {
    $log_file = $_GET['file'];
    if (file_exists($log_file)) {
        readfile($log_file);
    }
}

Patched Code (version 1.1.3): The patched version adds a capability check and restricts access to authenticated users with appropriate roles (e.g., manage_options).

// Patched: Added capability check
function elv_read_log() {
    if (!current_user_can('manage_options')) {
        wp_die('Unauthorized');
    }
    $log_file = $_GET['file'];
    // Additional sanitization and path validation
    $allowed_dir = WP_CONTENT_DIR . '/uploads/error-log-viewer/';
    $real_path = realpath($log_file);
    if (strpos($real_path, $allowed_dir) !== 0) {
        wp_die('Invalid file');
    }
    if (file_exists($log_file)) {
        readfile($log_file);
    }
}

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A WordPress site with the Error Log Viewer plugin (version < 1.1.3) installed and activated.
  • The plugin's log directory must be accessible via the web.

Exploitation Steps:

  1. Identify the plugin's log directory: Common paths include /wp-content/uploads/error-log-viewer/ or /wp-content/plugins/error-log-viewer/logs/.
  2. Access the directory listing: Use a web browser or curl:
    curl -v http://target.com/wp-content/uploads/error-log-viewer/
    
  3. List files: The server will return an HTML directory listing. Look for files like error.log, debug.log, or php_errors.log.
  4. Download a log file: Click on a file or use curl:
    curl -O http://target.com/wp-content/uploads/error-log-viewer/error.log
    
  5. Extract sensitive information: Search for patterns like password, DB_USER, DB_PASSWORD, API_KEY, or stack traces.

Example Output:

[01-Jan-2023 12:00:00 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'db_user'@'localhost' (using password: SuperSecret123) in /var/www/html/wp-includes/wp-db.php:123

Blue Team (Detection & Hardening)

Detection:

  • Monitor web server logs for requests to /wp-content/uploads/error-log-viewer/ or similar paths.
  • Look for HTTP 200 responses with directory listings (e.g., Index of /wp-content/uploads/error-log-viewer).
  • Alert on unusual file downloads from the plugin's directory.

Hardening:

  • Immediate: Update the plugin to version 1.1.3 or later.
  • Mitigation (if patching is delayed):
    • Add an index.php file to the log directory to prevent directory listing:
      <?php
      // Silence is golden.
      
    • Add .htaccess rules to deny access:
      <FilesMatch "\.(log)$">
          Order allow,deny
          Deny from all
      </FilesMatch>
      Options -Indexes
      
    • Move the log directory outside the web root (if possible).
  • Monitoring: Implement file integrity monitoring (FIM) on the log directory.

Indicators of Compromise (IOCs)

  • Network IOCs:
    • HTTP GET requests to /wp-content/uploads/error-log-viewer/ or /wp-content/plugins/error-log-viewer/logs/.
    • User-Agent strings indicating automated scanning (e.g., curl, python-requests, Go-http-client).
  • File IOCs:
    • Presence of log files in the plugin's directory (e.g., error.log, debug.log).
    • Unauthorized access to log files (check file access times).
  • Behavioral IOCs:
    • Multiple requests to the same directory from a single IP.
    • Downloading of .log files from the plugin's directory.

Detection Engineering

YARA Rule

rule CVE_2023_6821_Error_Log_Viewer_Directory_Listing {
    meta:
        description = "Detects directory listing of Error Log Viewer plugin log directory"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-6821"
        hash = "d41d8cd98f00b204e9800998ecf8427e"
    strings:
        $dir_listing = "Index of /wp-content/uploads/error-log-viewer"
        $log_file = ".log"
    condition:
        $dir_listing or (uint16(0) == 0x4D5A and $log_file)
}

Sigma Rule

title: CVE-2023-6821 Error Log Viewer Directory Listing
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects attempts to list or access log files from the Error Log Viewer plugin
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-6821
logsource:
    category: webserver
    product: apache
    service: access_log
detection:
    selection:
        cs-uri-stem:
            - "/wp-content/uploads/error-log-viewer/*"
            - "/wp-content/plugins/error-log-viewer/logs/*"
        sc-status: 200
    condition: selection
falsepositives:
    - Legitimate admin access (if authenticated)
level: medium
tags:
    - attack.t1083
    - cve.2023.6821

Suricata Rule

alert http any any -> $EXTERNAL_NET any (msg:"CVE-2023-6821 Error Log Viewer Directory Listing Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/wp-content/uploads/error-log-viewer/"; http_uri; nocase; content:"200"; http_server_body; pcre:"/Index of \/wp-content\/uploads\/error-log-viewer/"; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update the plugin: Upgrade to version 1.1.3 or later from the WordPress plugin repository.
  2. Verify update: Check that the plugin version is >= 1.1.3 in the WordPress admin dashboard.

Long-Term Mitigations:

  • Web Application Firewall (WAF): Block requests to /wp-content/uploads/error-log-viewer/ from unauthenticated users.
  • File Permissions: Ensure log directories have restrictive permissions (e.g., 750) and are owned by the web server user.
  • Disable Directory Listing: Add Options -Indexes to the Apache configuration or use equivalent Nginx directives.
  • Monitor Plugin Updates: Subscribe to security advisories for WordPress plugins.

Workaround (if patching is not possible):

  • Manually add an index.php file to the log directory with the following content:
    <?php
    // Silence is golden.
    
  • Add .htaccess file with:
    Order deny,allow
    Deny from all
    

Valters IT – Securing digital frontiers.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"Error Log Viewer"
http.html:"BestWebSoft" "Error Log Viewer"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-6821/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.