Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-47440

CVE-2025-47440: WPAdverts PHP File Inclusion Vulnerability

CVE-2025-47440 is a PHP local file inclusion vulnerability in the WPAdverts WordPress plugin that allows attackers to include malicious files. This article covers the technical details, affected versions through 2.2.2, and mitigation.

Published:

CVE-2025-47440 Overview

CVE-2025-47440 is a PHP Local File Inclusion (LFI) vulnerability in the WPAdverts WordPress plugin developed by Greg Winiarski. The flaw affects all versions of WPAdverts up to and including 2.2.2. It stems from improper control of filenames used in PHP include or require statements, categorized under [CWE-98]. An authenticated attacker with low privileges can abuse the flaw over the network to include local PHP files and execute arbitrary code in the WordPress context.

Critical Impact

Successful exploitation can lead to disclosure of sensitive files, code execution, and full compromise of the affected WordPress site.

Affected Products

  • WPAdverts plugin for WordPress, versions up to and including 2.2.2
  • WordPress installations running the vulnerable plugin
  • Sites with authenticated low-privilege users on the WordPress instance

Discovery Timeline

  • 2025-05-07 - CVE-2025-47440 published to NVD
  • 2026-04-23 - Last updated in NVD database

Technical Details for CVE-2025-47440

Vulnerability Analysis

The vulnerability is a PHP Remote File Inclusion class flaw that, in this case, allows Local File Inclusion. WPAdverts passes user-controllable input into a PHP include or require statement without proper validation or path normalization. An attacker with at least low-privilege authenticated access can request execution paths that resolve to attacker-influenced local files within the server file system.

When the included file is parsed by the PHP interpreter, its contents are executed in the context of the WordPress site. This can expose sensitive configuration files such as wp-config.php, leak database credentials, or escalate to code execution if combined with file upload primitives that place PHP payloads on disk.

Root Cause

The root cause is improper control of a filename used in a PHP include statement [CWE-98]. The plugin trusts a request parameter that influences the path passed to include/require without enforcing a strict allowlist of permitted files or sanitizing directory traversal sequences such as ../. The exploitability conditions, requiring authentication and high attack complexity, reflect constraints on reaching the vulnerable code path.

Attack Vector

The attack vector is network-based and requires authenticated low-privilege access to the WordPress site. An authenticated attacker issues a crafted HTTP request to a WPAdverts endpoint, providing a manipulated parameter that controls which local file the plugin loads. The vulnerability is documented in the Patchstack Vulnerability Report, which contains technical details for the affected code paths.

Detection Methods for CVE-2025-47440

Indicators of Compromise

  • HTTP requests to WPAdverts endpoints containing path traversal sequences such as ../ or absolute file paths in parameters
  • WordPress access logs showing authenticated requests that reference unusual local file paths like wp-config.php, /etc/passwd, or PHP session files
  • Unexpected PHP errors in web server logs referencing include() or require() failures originating from WPAdverts plugin files

Detection Strategies

  • Inspect WordPress access logs for requests targeting WPAdverts plugin scripts with parameters that contain file paths or traversal characters
  • Enable WordPress audit logging to correlate low-privilege user actions with file inclusion attempts
  • Deploy Web Application Firewall (WAF) rules that flag LFI patterns against /wp-content/plugins/wpadverts/ URIs

Monitoring Recommendations

  • Monitor process and file telemetry on the web server for the PHP worker accessing files outside the plugin directory
  • Alert on read access to wp-config.php or other sensitive files by the PHP-FPM or Apache user outside of normal site operations
  • Track creation of new PHP files in upload directories that could be paired with the LFI to achieve code execution

How to Mitigate CVE-2025-47440

Immediate Actions Required

  • Identify all WordPress sites running WPAdverts version 2.2.2 or earlier and prioritize them for remediation
  • Restrict or disable low-privilege account creation and review existing accounts for anomalous activity
  • Place vulnerable sites behind a WAF with rules blocking LFI payloads until patched

Patch Information

At the time of publication, the vendor advisory referenced in the Patchstack Vulnerability Report is the authoritative source for patched version information. Administrators should upgrade WPAdverts to the latest version that addresses CVE-2025-47440 and validate the installation against the vendor changelog.

Workarounds

  • Deactivate the WPAdverts plugin if a patched version cannot be applied immediately
  • Apply web server rules that deny direct access to plugin PHP files not intended to be reached over HTTP
  • Configure PHP open_basedir to constrain file inclusion to the WordPress directory tree, limiting the scope of any LFI attempt
bash
# Example PHP open_basedir restriction in php.ini or vhost config
php_admin_value open_basedir "/var/www/html/wordpress/:/tmp/"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.