CVE-2025-31040

8.1 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 sites running the WP Food ordering and Restaurant Menu plugin version 1.1 and earlier. Attackers can potentially read sensitive files or execute arbitrary code.

💻 Affected Systems

Products:
  • WP Food ordering and Restaurant Menu WordPress plugin
Versions: 1.1 and earlier
Operating Systems: All operating systems running PHP
Default Config Vulnerable: ⚠️ Yes
Notes: Requires WordPress installation with vulnerable plugin version. PHP configuration with allow_url_include disabled does not prevent local file inclusion.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise through local file inclusion leading to remote code execution, data theft, and complete site takeover.

🟠

Likely Case

Sensitive file disclosure (configuration files, database credentials), limited code execution, and potential privilege escalation.

🟢

If Mitigated

Limited impact if proper file permissions and web server configurations restrict access to sensitive directories.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires no authentication and uses simple HTTP requests with path traversal payloads.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.2 or later

Vendor Advisory: https://patchstack.com/database/wordpress/plugin/wp-food/vulnerability/wordpress-wp-food-ordering-and-restaurant-menu-1-1-local-file-inclusion-vulnerability?_s_id=cve

Restart Required: No

Instructions:

1. Log into WordPress admin panel. 2. Navigate to Plugins > Installed Plugins. 3. Find 'WP Food ordering and Restaurant Menu'. 4. Click 'Update Now' if available. 5. If no update available, deactivate and delete plugin, then install fresh version 1.2+ from WordPress repository.

🔧 Temporary Workarounds

Disable vulnerable plugin

all

Temporarily disable the plugin until patched version is available

wp plugin deactivate wp-food

Restrict PHP include paths

linux

Configure PHP to restrict include paths to safe directories

php_admin_value open_basedir "/var/www/html:/tmp"

🧯 If You Can't Patch

  • Implement web application firewall (WAF) rules to block path traversal patterns
  • Restrict file system permissions and implement strict access controls on sensitive directories

🔍 How to Verify

Check if Vulnerable:

Check WordPress admin panel > Plugins for WP Food ordering and Restaurant Menu version 1.1 or earlier

Check Version:

wp plugin get wp-food --field=version

Verify Fix Applied:

Verify plugin version is 1.2 or later in WordPress admin panel

📡 Detection & Monitoring

Log Indicators:

  • HTTP requests with ../ patterns in parameters
  • PHP include/require errors in web server logs
  • Access to unexpected files like /etc/passwd

Network Indicators:

  • HTTP requests with path traversal payloads (../../etc/passwd)
  • Unusual file access patterns from single IP

SIEM Query:

source="web_server_logs" AND ("../" OR "..\" OR "/etc/" OR "/proc/") AND uri_path="*wp-food*"

🔗 References

📤 Share & Export