CVE-2025-30814
Executive Summary
CVE-2025-30814 is a critical PHP Local File Inclusion (LFI) vulnerability discovered in the WordPress plugin The Post Grid by RadiusTheme. The flaw resides in improper control of filenames used in PHP include/require statements, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure, such as reading /etc/passwd, configuration files, or source code. The vulnerability affects all versions up to and including 7.7.17. No public exploit code or patch details are currently available, but the risk is significant due to the plugin's widespread use in WordPress sites.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin from the WordPress dashboard or via direct download are impacted. No package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: None
- Availability Impact: None
The vulnerability is easily exploitable remotely without authentication, making it a high-priority threat for WordPress administrators.
Deep Dive & Mechanics
The vulnerability exists in the the-post-grid plugin's PHP code, where user-supplied input is used to construct a file path for inclusion via include() or require(). The plugin likely uses a parameter (e.g., template, style, or layout) to load custom templates or styles. Due to insufficient sanitization, an attacker can inject path traversal sequences (e.g., ../../) to include arbitrary files from the server.
Root Cause: The plugin fails to validate or sanitize the filename parameter before passing it to a PHP include statement. This allows an attacker to specify a file outside the intended directory.
Example vulnerable code pattern:
$template = $_GET['template'];
include(plugin_dir_path(__FILE__) . 'templates/' . $template . '.php');
An attacker can supply template=../../../../etc/passwd%00 to include /etc/passwd (null byte injection may be required in older PHP versions).
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the fix. The vulnerable code likely lacks input validation. A patched version would implement:
Vulnerable Code (hypothetical):
$template = $_GET['template'];
include(plugin_dir_path(__FILE__) . 'templates/' . $template . '.php');
Patched Code (hypothetical):
$allowed_templates = ['default', 'grid', 'list'];
$template = $_GET['template'];
if (in_array($template, $allowed_templates)) {
include(plugin_dir_path(__FILE__) . 'templates/' . $template . '.php');
} else {
// Handle error
}
The patch restricts inclusion to a whitelist of allowed templates, preventing arbitrary file inclusion.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with The Post Grid plugin version <= 7.7.17.
- Knowledge of the vulnerable parameter (likely
template,layout, orstyle).
Exploitation Steps:
- Identify the vulnerable endpoint (e.g.,
wp-content/plugins/the-post-grid/templates/or a shortcode). - Craft a request to include a sensitive file:
GET /wp-content/plugins/the-post-grid/templates/?template=../../../../etc/passwd%00 HTTP/1.1 Host: target.com - If successful, the response will contain the contents of
/etc/passwd.
Proof of Concept (PoC) using curl:
curl -v "http://target.com/wp-content/plugins/the-post-grid/templates/?template=../../../../etc/passwd%00"
Blue Team
Detection:
- Monitor web server logs for path traversal patterns (e.g.,
../,%2e%2e%2f). - Look for requests to the plugin's template directory with suspicious parameters.
- Use WAF rules to block path traversal attempts.
Hunting:
- Search for
includeorrequirestatements in the plugin's PHP files that use user input. - Check for file inclusion attempts in access logs.
Indicators of Compromise (IOCs)
- File Paths:
/etc/passwd,/etc/shadow,/wp-config.php - URL Patterns:
?template=../../,?layout=../../,?style=../../ - Log Entries: Requests containing
%00(null byte) or../sequences. - Plugin Version: The Post Grid <= 7.7.17
Detection Engineering
YARA Rule
rule CVE_2025_30814_The_Post_Grid_LFI {
meta:
description = "Detects attempts to exploit CVE-2025-30814 in The Post Grid plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-30814"
strings:
$path_traversal = /\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c/
$plugin_param = /template=|layout=|style=/
condition:
$path_traversal and $plugin_param
}
Sigma Rule
title: CVE-2025-30814 - The Post Grid LFI Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects path traversal attempts targeting The Post Grid plugin
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
c-uri|contains:
- 'template=../'
- 'layout=../'
- 'style=../'
- '%2e%2e%2f'
condition: selection
falsepositives:
- Legitimate use of relative paths (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30814 - The Post Grid LFI Attempt"; flow:to_server,established; content:"/the-post-grid/"; http_uri; content:"template="; http_uri; content:"../"; http_uri; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable or uninstall The Post Grid plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block path traversal patterns.
- Restrict file permissions on sensitive system files.
Long-term Fix:
- Apply the official patch from RadiusTheme when available.
- Upgrade to a patched version (monitor the plugin's changelog).
- Conduct a code review of the plugin to ensure input validation.
Workaround:
- Use a security plugin like Wordfence to block malicious requests.
- Modify the plugin's code to whitelist allowed templates (if you have developer access).
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.