CVE-2025-52815 Overview
CVE-2025-52815 is a Local File Inclusion (LFI) vulnerability in the AncoraThemes CityGov WordPress theme. The flaw stems from improper control of filenames used in PHP include or require statements [CWE-98]. Attackers can supply crafted input that causes the theme to include arbitrary local files during PHP execution. The vulnerability affects all CityGov versions from initial release through 1.9. Successful exploitation can lead to source code disclosure, sensitive file exposure, and remote code execution when combined with file upload primitives or log poisoning techniques.
Critical Impact
Unauthenticated network attackers can include arbitrary local files on the server, exposing credentials and potentially achieving remote code execution on WordPress sites running CityGov ≤ 1.9.
Affected Products
- AncoraThemes CityGov WordPress theme versions through 1.9
- WordPress installations using the CityGov theme
- Any hosting environment serving the vulnerable theme files
Discovery Timeline
- 2025-06-27 - CVE-2025-52815 published to the National Vulnerability Database
- 2026-04-23 - Last updated in NVD database
Technical Details for CVE-2025-52815
Vulnerability Analysis
The CityGov theme passes user-controllable input into PHP file inclusion functions without sufficient validation. PHP file inclusion functions such as include, include_once, require, and require_once interpret their argument as a filesystem path. When attacker-supplied data reaches these sinks, the interpreter loads and executes the referenced file as PHP code.
The issue is classified under CWE-98, which covers improper control of filename for include/require statements. Although the CWE title references Remote File Inclusion, the realized impact in CityGov is Local File Inclusion based on the advisory text. Exploitation requires no authentication and no user interaction, but the attack complexity is rated high, which suggests environmental conditions or path filtering must be bypassed.
Root Cause
The root cause is the absence of allow-list validation on the parameter that feeds into the include path. Inputs are likely concatenated directly with a base directory and a .php extension, enabling traversal sequences such as ../ to escape the intended directory. Without canonicalization or strict whitelisting, the function resolves attacker-chosen targets on the server.
Attack Vector
An unauthenticated remote attacker sends an HTTP request to a vulnerable CityGov endpoint with a manipulated parameter that influences the include path. The PHP interpreter then loads files such as wp-config.php, session data, or uploaded content. When attackers can plant PHP content into reachable files such as access logs, image metadata, or temporary upload directories, the inclusion converts to remote code execution under the web server account. See the Patchstack CityGov Vulnerability Report for advisory details.
Detection Methods for CVE-2025-52815
Indicators of Compromise
- HTTP requests to CityGov theme endpoints containing path traversal sequences such as ../, ..%2f, or null byte variants
- Web server access logs showing parameters that reference sensitive paths like wp-config.php, /etc/passwd, or /proc/self/environ
- Unexpected PHP errors referencing include(), require(), or failed to open stream for unusual filesystem locations
- New or modified PHP files in theme, upload, or temporary directories following suspicious inclusion requests
Detection Strategies
- Inspect WordPress access logs for query parameters consumed by CityGov templates that contain filesystem path characters
- Deploy web application firewall rules that block traversal patterns and references to known sensitive files
- Correlate inclusion attempts with subsequent outbound connections or webshell-like POST traffic
Monitoring Recommendations
- Enable PHP error logging and forward logs to a centralized SIEM for pattern analysis
- Monitor file integrity on the wp-content/themes/citygov/ directory and the WordPress uploads folder
- Alert on process executions originating from the web server user that spawn shells or system utilities
How to Mitigate CVE-2025-52815
Immediate Actions Required
- Identify all WordPress instances running the AncoraThemes CityGov theme and confirm the installed version
- Apply any vendor patch released above version 1.9, or disable and remove the CityGov theme until a fix is available
- Rotate WordPress secrets, database credentials, and API keys referenced in wp-config.php if exploitation is suspected
- Review web server logs for traversal patterns dating back to theme installation
Patch Information
The Patchstack advisory tracks fixes for this issue. Administrators should consult the Patchstack CityGov Vulnerability Report for the latest patched version and upgrade guidance from AncoraThemes.
Workarounds
- Place a web application firewall in front of WordPress and block requests containing traversal sequences targeting theme parameters
- Set the PHP directive open_basedir to restrict file access to the WordPress installation directory
- Disable allow_url_include in php.ini to prevent escalation to remote file inclusion
- Restrict write permissions on upload directories and disable PHP execution within them via web server configuration
# Example php.ini hardening
allow_url_include = Off
allow_url_fopen = Off
open_basedir = "/var/www/html:/tmp"
# Example Apache rule to block PHP execution in uploads
<Directory "/var/www/html/wp-content/uploads">
php_admin_flag engine off
</Directory>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

