CVE-2025-68983
Executive Summary
CVE-2025-68983 is a critical PHP Local File Inclusion (LFI) vulnerability discovered in the Greenmart WordPress theme developed by Thembay. The vulnerability stems from improper control of a filename used in a PHP include or require statement, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure, such as reading the wp-config.php file containing database credentials, or potentially achieving remote code execution if combined with file upload capabilities. The vulnerability affects all versions of Greenmart up to and including 4.2.11. As of this report, no official patch has been released, and no public proof-of-concept (PoC) code is available.
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 is specific to the WordPress ecosystem and the Greenmart theme distributed by Thembay. Since it is a theme, it is typically installed via the WordPress admin dashboard or manually uploaded. The supply chain risk is moderate, as the theme is a commercial product and may be bundled with other plugins or themes. Users are advised to verify the integrity of their theme files and monitor for updates from Thembay.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Base Score: 7.5 (High)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – The vulnerable component and the impacted component are the same.
- Confidentiality Impact: High (C:H) – Sensitive files can be read.
- Integrity Impact: None (I:N) – No file modification is possible.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: High. The vulnerability is easy to exploit and can lead to full disclosure of sensitive server files.
Deep Dive & Mechanics
The vulnerability exists in the Greenmart theme's PHP code, likely in a function that dynamically includes template files or other resources based on user-supplied input. The improper control of the filename allows an attacker to traverse directories using path traversal sequences (e.g., ../../) and include arbitrary files from the server.
Root Cause: The theme uses a user-controllable parameter (e.g., page, template, or file) in an include() or require() statement without proper sanitization or validation. For example:
include($_GET['template'] . '.php');
An attacker can supply a value like ../../../../etc/passwd%00 to include the /etc/passwd file (null byte injection may be required in older PHP versions) or ../../../wp-config to read the WordPress configuration file.
Impact: Successful exploitation allows an attacker to:
- Read sensitive files (e.g.,
/etc/passwd,wp-config.php, logs). - Potentially achieve remote code execution if they can upload a malicious file (e.g., via a separate file upload vulnerability) and then include it.
- Enumerate the file system structure.
Vulnerable vs. Patched Code
Since no patch is available, we can only hypothesize the vulnerable code pattern and the expected fix.
Vulnerable Code (Hypothetical):
// In a theme template loader
$template = $_GET['template'];
include( get_template_directory() . '/templates/' . $template . '.php' );
Patched Code (Expected):
// Whitelist allowed templates
$allowed_templates = array('home', 'single', 'page', 'archive');
$template = $_GET['template'];
if (in_array($template, $allowed_templates)) {
include( get_template_directory() . '/templates/' . $template . '.php' );
} else {
// Default template
include( get_template_directory() . '/templates/page.php' );
}
The fix should involve:
- Input validation: Only allow specific, predefined values.
- Path sanitization: Remove path traversal sequences (e.g.,
../). - Use of
realpath(): Resolve the path and ensure it is within the allowed directory.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site running Greenmart theme version <= 4.2.11.
- Knowledge of a vulnerable parameter (e.g.,
template,page,file).
Exploitation Steps:
- Identify the vulnerable parameter by fuzzing the theme's URL parameters.
- Craft a request to include a sensitive file:
GET /?template=../../../etc/passwd HTTP/1.1 Host: target.com - If the server returns the contents of
/etc/passwd, the vulnerability is confirmed. - To read
wp-config.php:GET /?template=../../../wp-config HTTP/1.1
Lab Setup:
- Install a local WordPress instance with Greenmart theme version 4.2.11.
- Use a tool like Burp Suite or curl to send crafted requests.
Example curl command:
curl -v "http://target.com/?template=../../../etc/passwd"
Blue Team (Defender)
Detection:
- Monitor web server logs for suspicious parameters containing path traversal sequences (e.g.,
../,..\\,%2e%2e%2f). - Look for requests to non-existent template files or attempts to include system files.
Prevention:
- Apply a Web Application Firewall (WAF) rule to block path traversal patterns.
- Disable PHP
allow_url_includeandallow_url_fopenif not needed. - Implement input validation and whitelisting on all user-supplied parameters.
Hunting:
- Search for log entries with parameters like
template=,page=, orfile=containing../. - Check for unusual file inclusion errors in PHP error logs.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests with parameters containing
../or..\\sequences. - Requests to
wp-content/themes/greenmart/with suspicious query strings. - Outbound connections from the web server to unknown IPs (if RCE is achieved).
- HTTP requests with parameters containing
File System IOCs:
- Unexpected files in the web root (e.g., shell.php).
- Modified theme files (e.g.,
functions.phpwith backdoor code). - Presence of
/etc/passwdorwp-config.phpin web server logs.
Log IOCs:
- PHP warnings or errors related to
include()orrequire()with path traversal. - Access logs showing
404errors for non-existent template files.
- PHP warnings or errors related to
Detection Engineering
YARA Rule
rule CVE_2025_68983_Greenmart_LFI {
meta:
description = "Detects attempts to exploit CVE-2025-68983 in Greenmart theme"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-68983"
strings:
$path_traversal = /(\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c)/ nocase
$greenmart_param = /(template|page|file)=/ nocase
condition:
$path_traversal and $greenmart_param
}
Sigma Rule
title: CVE-2025-68983 Greenmart LFI Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests with path traversal patterns targeting Greenmart theme
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-uri-query|contains:
- '../'
- '..\\'
- '%2e%2e%2f'
- '%2e%2e%5c'
cs-uri-query|contains|all:
- 'template='
- 'page='
- 'file='
condition: selection
falsepositives:
- Legitimate use of path traversal in other applications
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-68983 Greenmart LFI Attempt"; flow:to_server,established; content:"GET"; http_method; content:"/"; http_uri; content:"template="; http_uri; pcre:"/(\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e%5c)/Ri"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Greenmart theme and switch to a default WordPress theme (e.g., Twenty Twenty-Four) until a patch is available.
- Apply a WAF rule to block path traversal patterns in query strings.
- Monitor logs for exploitation attempts.
Long-term Fix:
- Contact Thembay for an official patch.
- If you have development resources, manually patch the vulnerable code by implementing input validation and whitelisting as described in the "Vulnerable vs. Patched Code" section.
Workarounds:
- Use a security plugin like Wordfence to add virtual patching.
- Restrict file inclusion via PHP configuration:
allow_url_include = Off allow_url_fopen = Off - Disable PHP execution in the uploads directory via
.htaccess:<Files *.php> deny from all </Files>
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.