Exploitable Local File Inclusion in Welldone Theme | CVE202628118 | 2026-02-28

← All articles

Posted on Feb 28, 2026 · WP-Firewall Team

Plugin Name Welldone
Type of Vulnerability Local File Inclusion
CVE Number CVE-2026-28118
Urgency High
Article/source date 2026-02-28
Source URL CVE-2026-28118
Public CVE record date2026-03-05

Urgent Security Alert: Local File Inclusion in Welldone Theme (<= 2.4) — Critical Actions for WordPress Site Owners

Managed-WP security experts have identified a severe Local File Inclusion (LFI) vulnerability impacting the Welldone WordPress theme, versions 2.4 and below. Catalogued as CVE-2026-28118 with a high CVSS score of 8.1, this flaw enables unauthenticated attackers to include and expose sensitive local files from your WordPress environment.

This exposure can quickly lead to disclosure of critical information such as database credentials, API keys, and configuration data — dramatically increasing the risk of full site compromise. Immediate and methodical mitigation is essential for anyone running the affected theme.

As part of the Managed-WP team, we provide you with expert, actionable guidance below — detailing the nature of this risk, technical attack methods, detection indicators, and prioritized remediation steps. Whether you manage a single site or an entire portfolio of WordPress installations, these recommendations are streamlined for rapid implementation.

Vulnerability Overview

  • Affected Software: Welldone WordPress theme
  • Versions Impacted: 2.4 and earlier
  • Type: Local File Inclusion (LFI)
  • CVE Identifier: CVE-2026-28118
  • Severity: High (CVSS 8.1)
  • Authentication: None required (unauthenticated)
  • Potential Impact: Arbitrary file reading, disclosure of credentials and sensitive data, potential full site takeover depending on server setup
  • Reporter: Tran Nguyen Bao Khanh (disclosed Aug 19, 2025; public Feb 28, 2026)

Why LFI Attacks Threaten WordPress Sites

Local File Inclusion vulnerabilities occur when software integrates user inputs into filesystem file paths without rigorous validation. In PHP, this vulnerability often exploits functions like include() and require(), which may load arbitrary files if unhardened.

For WordPress specifically:

  • The wp-config.php file contains database logins and secret keys — exposing this file can grant attackers database access.
  • Other local files might have API credentials, SMTP passwords, or proprietary configuration that compromise your infrastructure.
  • Attackers can escalate this flaw into remote code execution by using PHP stream wrappers (php://filter, etc.) or compromising writable upload directories to introduce backdoors.
  • Unauthenticated access combined with automated scanning means attackers will aggressively target vulnerable installations.

Technical Attack Overview

Exploitation normally involves an unvalidated parameter used in a file inclusion call, e.g.,

include( $template_path . $_GET['page'] . '.php' );

Attackers substitute this parameter with directory traversal sequences (../../../../wp-config.php) or PHP stream wrappers (php://filter) to access sensitive files. Complex exploit chains may even leverage these disclosures into full remote code execution.

Detection and Warning Signs to Monitor

Audit your logs carefully for these indicators:

  1. Query strings containing directory traversal tokens such as ../ or their URL-encoded equivalents (%2e%2e%2f, %2e%2e%5c).
  2. Requests targeting sensitive files like wp-config.php, .env, or system files (/etc/passwd).
  3. Parameters named file, page, template, etc., with anomalous values.
  4. Use of suspicious PHP wrapper syntax within URLs (php://, data://).
  5. Unusual new or modified PHP/Javascript files under writable directories.
  6. Unexpected spikes in admin user creation or modified filesystem permissions.

Immediate Mitigation Steps (Within Hours)

  1. Disable the vulnerable Welldone theme temporarily
    • Switch your site to a default WordPress theme or an up-to-date alternative.
    • If not feasible, place your site in maintenance mode during remediation.
  2. Remove or isolate the vulnerable theme from your filesystem
    • Via server access (SFTP, SSH), rename or delete the wp-content/themes/welldone folder to eliminate the attack vector.
    • Retain a backup copy offline if you are performing a forensic investigation.
  3. Implement web server or WAF blocking rules
    • Block requests containing directory traversal and PHP wrapper patterns.
    • Sample Nginx directive:
    if ($request_uri ~* "(%2e|%2f|\.\./|\.\.\\)") {
        return 403;
    }
    if ($request_uri ~* "php://|data://|expect://|file://") {
        return 403;
    }
    
  4. Example Apache .htaccess snippet:
  5. <Files "wp-config.php">
      Order allow,deny
      Deny from all
    </Files>
    
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{QUERY_STRING} (\.\.|php://|data://) [NC,OR]
      RewriteCond %{REQUEST_URI} (\.\.|php://|data://) [NC]
      RewriteRule ^.* - [F,L]
    </IfModule>
    
  6. Test changes on staging to avoid unintended disruptions.
  7. Harden file permissions and ownership
    • Set wp-config.php permissions to 400 or 440.
    • Use 755 for directories and 644 for files, with stricter permissions for sensitive files.
    • Verify ownership is aligned with web server best practices to minimize unauthorized file modifications.
  8. Disable risky PHP features
    • In php.ini, set allow_url_fopen = Off and allow_url_include = Off.
    • Disable dangerous functions like exec, shell_exec, and others if unused:
    disable_functions = exec,shell_exec,system,passthru,proc_open,popen
    
  9. Block hazardous query parameters in theme endpoints
    • Identify theme URLs that accept file parameters and restrict or block requests containing them until patches are applied.
  10. Activate or configure a Managed-WP firewall or virtual patching solution
    • Enable real-time fault-tolerant security rules blocking exploitation vectors.
    • Virtual patching buys time until official theme updates can be safely deployed.

Medium-Term Actions (Within Days)

  1. Update or replace the vulnerable theme
    • Apply a vendor patch if available after testing in staging.
    • If no fix is available, transition to a secure, maintained theme alternative.
  2. Scan for malicious files and indicators of compromise
    • Manually or with tools, audit uploads, themes, and plugins for unexplained PHP files, backdoors, or changes.
  3. Rotate all credentials and secret keys
    • Change admin passwords, database credentials, API keys, and tokens.
    • If restoring backups, rotate credentials afterward.
  4. Review server and app logs
    • Look for suspicious activity around the vulnerability disclosure date and thereafter.
    • Archive logs for forensic analysis if needed.
  5. Conduct malware and integrity scans
    • Use trusted scanners to detect webshells, backdoors, and unauthorized code modifications.
    • Validate core files against known-good sources.
  6. Restore from backups in confirmed compromise cases
    • Only restore known-clean backups prior to infection events.
    • Reapply security hardening post-restore.

Long-Term Security Strategy (Weeks and Beyond)

  1. Enforce least privilege principles
    • Limit file, database, and system permissions strictly to what is required.
    • Separate web server user from file owners where possible.
  2. Isolate environments
    • Maintain strict segregation between staging, production, and development environments.
    • Use distinct credentials for each environment.
  3. Deploy continuous monitoring and alerts
    • Centralize logs and configure alerts for traversal attempts, suspicious file accesses, and error spikes.
  4. Automate vulnerability detection and patching
    • Regularly scan themes and plugins for vulnerabilities.
    • Subscribe to security feeds and act promptly on disclosures.
  5. Maintain and test backups regularly
    • Ensure off-site backups are taken and restoration procedures tested.
  6. Harden WordPress installations
    • Keep WordPress core, themes, and plugins updated.
    • Remove unused themes and plugins promptly.
    • Disable or lock down theme/plugin editors.
    • Use protective HTTP headers and enforce HTTPS.

Recommended WAF Detection Patterns (Conceptual)

Consider adding these detection regex patterns to your Web Application Firewall rules. Test thoroughly to prevent false positives.

  • Block directory traversal sequences:
    (\.\./|\.\.\\|%2e%2e%2f|%2e%2e%5c)
  • Block PHP wrappers:
    (php://|data://|expect://|zip://|phar://)
  • Block queries referencing sensitive files:
    (wp-config\.php|/etc/passwd|/proc/self/environ|\.env|\.htpasswd)
  • Block suspiciously long encoded sequences:
    (%[0-9A-Fa-f]{2}){6,}

Sample WAF pseudo-rule:

  • If the request query string matches any of these patterns:
    (\.\./|\.\.\\|%2e%2e%2f|%2e%2e%5c) OR
    (php://|data://|expect://) OR
    (wp-config\.php|/etc/passwd|\.env)
    Then block the request with HTTP 403 and log details.

Warning: Legitimate requests may contain strings resembling these patterns. Scope restrictions to theme endpoints and gradual tuning reduce false positives.

Incident Response Checklist for Confirmed Compromise

  1. Take the site offline or isolate the host immediately.
  2. Capture full snapshots of filesystem and logs for forensic analysis.
  3. Reset all passwords: admin accounts, databases, FTP/SFTP, and control panels.
  4. Rotate API keys, tokens, and other credentials potentially exposed.
  5. Identify and remove malicious files, webshells, and backdoors. Consider restoring from a clean backup if unsure.
  6. Verify database integrity and remove unauthorized user accounts or injected content.
  7. Perform thorough audit to identify intrusion methods and lateral pivots.
  8. Rebuild the site environment from verified sources if necessary to ensure security.

Technical Guidance for Developers and Administrators

The root cause of LFI vulnerabilities typically stems from unsafe concatenation or injection of untrusted input into file inclusion calls. Use these principles:

  • Whitelist allowed filenames instead of accepting arbitrary user input.
  • Use secure mappings from input parameters to controlled file paths.
  • Normalize, validate, and sanitize any path inputs before filesystem operations.
  • Limit template or file loading choices to a predefined, trusted set.

Example safe usage pattern:

<?php
$allowed_templates = ['home', 'archive', 'single'];
$template_name = $_GET['tpl'] ?? 'home';

if (!in_array($template_name, $allowed_templates, true)) {
    $template_name = 'home'; // fallback for invalid input
}

include get_template_part('templates/' . $template_name . '.php');

Quick Security Rule Examples

Protect wp-config.php via .htaccess:

<files wp-config.php>
  order allow,deny
  deny from all
</files>

Nginx blocking for php wrapper usage:

if ($query_string ~* "php://|data://|%2e%2e|(\.\./)") {
  return 403;
}

PHP ini configuration hardening:

allow_url_fopen = Off
allow_url_include = Off
disable_functions = exec,shell_exec,system,passthru,proc_open,popen

Note: Always validate such rules in staging environments to prevent unintended blocking of legitimate traffic.

Next 24 to 72 Hours: Critical To-Do List

  1. Identify all WordPress sites using Welldone theme version 2.4 or earlier.
  2. Perform at least one immediate mitigation:
    • Disable or rename the Welldone theme folder;
    • Implement server or WAF-level request blocking;
    • Lock down sensitive files such as wp-config.php.
  3. Activate continuous scanning and monitoring tools.
  4. Enroll in Managed-WP’s virtual patching protection plan (free/basic available) for automatic exploit blocking.
  5. Communicate and coordinate with clients or stakeholders to maintain transparency.

Need Help? Managed-WP Security Operations Support

Whether you manage multiple WordPress installations or client websites, our security operations team offers:

  • Deep log analysis and triage assistance.
  • Fleet-wide deployment of virtual patches and WAF rules.
  • Incident response and clean-up expertise.
  • Step-by-step guidance for safe theme updates and replacements.

Final Thoughts

This Local File Inclusion vulnerability in the Welldone theme is a critical risk demanding immediate action. Removing or isolating the vulnerable theme and employing virtual patching is essential for minimizing attack surface. Coupling this with strong permissions, disabled risky PHP wrappers, and rigorous monitoring will significantly reduce exposure.

For effortless, expert-managed protection that moves beyond basic hosting security, try Managed-WP’s Basic plan free of charge today: https://my.wp-firewall.com/buy/wp-firewall-free-plan/

— The Managed-WP Security Team

References

  • CVE-2026-28118, Local File Inclusion in Welldone theme. Reported August 19, 2025; Published February 28, 2026.
  • This advisory is designed to assist defenders only. Exploit details are withheld for security reasons. If you suspect a breach, escalate to professional security responders promptly.