CVE-2025-58709

8.1 HIGH

📋 TL;DR

This CVE describes a PHP Local File Inclusion vulnerability in the Legacy WordPress theme by axiomthemes. Attackers can exploit improper filename control in include/require statements to read sensitive files on the server. All WordPress sites using Legacy theme version 1.9 or earlier are affected.

💻 Affected Systems

Products:
  • axiomthemes Legacy WordPress Theme
Versions: All versions up to and including 1.9
Operating Systems: Any OS running PHP and WordPress
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with Legacy theme active. PHP configuration with allow_url_include disabled may limit but not eliminate risk.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise through reading sensitive files like /etc/passwd, database credentials, or executing arbitrary PHP code leading to remote code execution.

🟠

Likely Case

Information disclosure of sensitive server files, potentially exposing credentials, configuration files, or source code.

🟢

If Mitigated

Limited impact if file permissions are properly configured and sensitive files are not accessible via web user.

🌐 Internet-Facing: HIGH - WordPress themes are typically internet-facing and this vulnerability requires no authentication.
🏢 Internal Only: MEDIUM - Internal WordPress installations could still be exploited by internal attackers or through phishing.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Simple path traversal or file inclusion payloads can exploit this. Public proof-of-concept exists in vulnerability databases.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 1.9 (check theme repository for latest)

Vendor Advisory: https://patchstack.com/database/Wordpress/Theme/legacy/vulnerability/wordpress-legacy-theme-1-9-local-file-inclusion-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Update Legacy theme to latest version via WordPress admin panel. 2. If update not available, remove theme entirely. 3. Verify theme files are replaced with patched versions.

🔧 Temporary Workarounds

Disable Legacy Theme

all

Switch to default WordPress theme or alternative secure theme

wp theme activate twentytwentyfour
wp theme delete legacy

PHP Configuration Hardening

linux

Set allow_url_include=Off and open_basedir restrictions

echo 'allow_url_include = Off' >> /etc/php/8.x/apache2/php.ini
echo 'open_basedir = /var/www/html' >> /etc/php/8.x/apache2/php.ini

🧯 If You Can't Patch

  • Remove Legacy theme completely and use alternative theme
  • Implement web application firewall (WAF) rules to block file inclusion patterns

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Appearance > Themes for Legacy theme version 1.9 or earlier

Check Version:

wp theme list --field=name,status,version | grep legacy

Verify Fix Applied:

Verify theme version is greater than 1.9 or theme is removed. Test with controlled LFI payloads.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file paths in PHP error logs
  • include/require statements with ../ patterns
  • Requests to theme files with file parameter

Network Indicators:

  • HTTP requests containing ../ or file:// in query parameters
  • Requests to wp-content/themes/legacy/ with suspicious parameters

SIEM Query:

source="*access.log*" AND "wp-content/themes/legacy" AND (".." OR "file=" OR "include=")

🔗 References

📤 Share & Export