CVE-2025-58929

8.2 HIGH

📋 TL;DR

This vulnerability allows attackers to include local files on the server through improper filename control in PHP include/require statements. It affects WordPress Pantry theme users running versions up to and including 1.4, potentially leading to sensitive information disclosure or code execution.

💻 Affected Systems

Products:
  • Pantry WordPress Theme
Versions: n/a through <= 1.4
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with Pantry theme active. PHP configuration with allow_url_include disabled does not prevent local file inclusion.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise through local file inclusion leading to remote code execution, sensitive file access (like /etc/passwd, database credentials), and complete website takeover.

🟠

Likely Case

Information disclosure of sensitive server files, configuration files, and potentially source code, which could enable further attacks.

🟢

If Mitigated

Limited impact with proper file permissions, disabled PHP execution in upload directories, and web application firewall rules blocking file inclusion patterns.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation typically involves manipulating URL parameters to include local files. Public proof-of-concept exists in vulnerability databases.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: >1.4

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

Restart Required: No

Instructions:

1. Update Pantry theme to latest version (>1.4) via WordPress admin panel. 2. Navigate to Appearance > Themes. 3. Check for updates on Pantry theme. 4. Apply update immediately.

🔧 Temporary Workarounds

Disable vulnerable theme

all

Switch to default WordPress theme until patch can be applied

Web Application Firewall rule

all

Block requests containing local file inclusion patterns in parameters

🧯 If You Can't Patch

  • Implement strict input validation on all user-controlled parameters
  • Restrict file system access through proper directory permissions and disable dangerous PHP functions

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Appearance > Themes for Pantry theme version. If version is 1.4 or lower, system is vulnerable.

Check Version:

wp theme list --field=name,version --format=csv | grep pantry

Verify Fix Applied:

Confirm Pantry theme version is greater than 1.4 in WordPress admin panel.

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with suspicious file paths in parameters (e.g., ../../../etc/passwd)
  • Multiple 404 errors followed by successful file access

Network Indicators:

  • Unusual file path patterns in URL parameters
  • Requests to theme files with parameter manipulation

SIEM Query:

source="web_logs" AND (uri="*../../*" OR uri="*/etc/*" OR uri="*passwd*")

🔗 References

📤 Share & Export