Case Theme User WordPress Plugin Local File Inclusion Vulnerability (CVE-2025-5804)
CVE-2025-5804 is a PHP Local File Inclusion vulnerability in the Case Theme User WordPress plugin before version 1.0.4 due to improper filename control in include/require statements, potentially allowing attackers to execute arbitrary code by including malicious local files.
A local file inclusion (LFI) vulnerability, identified as CVE-2025-5804, affects the Case Theme User WordPress plugin before version 1.0.4. The vulnerability stems from insufficient validation of filenames passed to PHP’s include or require statements. This allows an unauthenticated attacker to potentially include arbitrary local files on the server hosting the WordPress instance. Successful exploitation could lead to sensitive information disclosure, arbitrary code execution, or denial of service. The vulnerability was reported and patched by Patchstack. Users of the Case Theme User plugin are advised to upgrade to version 1.0.4 or later to mitigate this risk.
Attack Chain
- An attacker identifies a vulnerable Case Theme User plugin running on a WordPress site.
- The attacker crafts a malicious HTTP request targeting a PHP file within the plugin that uses an
includeorrequirestatement. - The attacker modifies a GET or POST parameter associated with the vulnerable
includeorrequirestatement, injecting a path to a local file (e.g.,/etc/passwd). - The web server processes the request, and the PHP interpreter attempts to include the file specified in the attacker-controlled parameter.
- Due to the LFI vulnerability, the server includes the attacker-specified local file.
- If the included file contains sensitive data, such as configuration files or credentials, the attacker can extract this information from the server’s response.
- In more advanced scenarios, the attacker might attempt to include PHP files containing malicious code, achieving remote code execution on the server.
Impact
Successful exploitation of CVE-2025-5804 can lead to a range of impacts, including sensitive information disclosure such as WordPress configuration files (wp-config.php), which contain database credentials. Arbitrary code execution is possible if the attacker can include a file containing malicious PHP code. This could allow the attacker to gain complete control of the WordPress site and the underlying server. The number of affected sites depends on the adoption rate of the vulnerable Case Theme User plugin, but given the widespread use of WordPress, the potential impact could be significant.
Recommendation
- Immediately update the Case Theme User WordPress plugin to version 1.0.4 or later to patch CVE-2025-5804.
- Deploy the Sigma rule
Detect Case Theme User LFI Attemptto your SIEM to identify potential exploitation attempts based on suspicious file paths in HTTP requests. - Monitor web server logs for unusual file access patterns, particularly requests containing “..”, “%2e%2e”, or other directory traversal sequences, to catch LFI attempts (see log source
webserver).
Detection coverage 2
Detect Case Theme User LFI Attempt
highDetects potential Local File Inclusion (LFI) attempts targeting the Case Theme User WordPress plugin by monitoring HTTP requests containing directory traversal sequences.
Detect PHP file access outside webroot
mediumDetects potential Local File Inclusion (LFI) attempts by monitoring PHP file access outside the webroot.
Detection queries are kept inside the platform. Get full rules →
Indicators of compromise
1
| Type | Value |
|---|---|
| [email protected] |