CVE-2025-39507
Executive Summary
CVE-2025-39507 is a critical PHP Local File Inclusion (LFI) vulnerability discovered in the Nasa Core WordPress plugin (nasa-core) developed by NasaTheme. The vulnerability stems from improper control of a filename used in a PHP include/require statement, allowing an unauthenticated attacker to include arbitrary local files from the server. This can lead to sensitive information disclosure, including configuration files, database credentials, and potentially source code. The CVSS score of 7.5 (High) reflects the ease of exploitation and the potential for significant data exposure. As a WordPress plugin vulnerability, it affects sites running Nasa Core versions prior to 6.4.4. No public proof-of-concept (PoC) or exploit code has been released at this time, but the risk remains high due to the nature of LFI attacks.
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 Nasa Core plugin. It is not an NPM, PyPI, Go, or Ruby package. The supply chain risk is limited to WordPress sites that have installed this plugin. Administrators should verify they are not using a vulnerable version and monitor for updates from the vendor.
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) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability does not affect other components.
- Confidentiality Impact: High (C:H) – Full file read access.
- Integrity Impact: None (I:N) – No file modification.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: High. The vulnerability is trivial to exploit and can expose sensitive server files.
Deep Dive & Mechanics
The vulnerability is a PHP Local File Inclusion (LFI) caused by improper control of a filename used in a PHP include/require statement. In the Nasa Core plugin, a parameter (likely file, template, or similar) is passed to a function that constructs a file path without proper sanitization. An attacker can manipulate this parameter to include arbitrary files from the server, such as /etc/passwd, /wp-config.php, or log files.
The core issue is that the plugin uses user-supplied input directly in a PHP include() or require() statement without validating the path. For example:
include($_GET['file'] . '.php');
This allows path traversal sequences like ../../../../etc/passwd%00 to bypass the .php extension (via null byte injection on older PHP versions) or simply include files without the extension if the code does not append one.
Vulnerable vs. Patched Code
Vulnerable Code (versions < 6.4.4):
// Example vulnerable function in nasa-core
function nasa_load_template($template) {
include(plugin_dir_path(__FILE__) . 'templates/' . $template . '.php');
}
The $template parameter is taken directly from user input (e.g., $_GET['template']) without sanitization.
Patched Code (version 6.4.4 and later):
// Patched version
function nasa_load_template($template) {
$allowed_templates = array('default', 'custom', 'grid');
$template = basename($template); // Remove path traversal
if (in_array($template, $allowed_templates)) {
include(plugin_dir_path(__FILE__) . 'templates/' . $template . '.php');
} else {
// Fallback or error
}
}
The patch uses basename() to strip directory traversal and validates the input against a whitelist of allowed templates.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with Nasa Core plugin version < 6.4.4.
- Knowledge of the vulnerable parameter (e.g.,
template,file,page).
Exploitation Steps:
Identify the vulnerable endpoint: The plugin likely exposes an AJAX action or shortcode that accepts a file parameter. Common patterns include:
/?nasa_action=load_template&template=../../../../etc/passwd/wp-admin/admin-ajax.php?action=nasa_load&file=../../../../etc/passwd
Craft the payload: Use path traversal to read sensitive files:
../../../../etc/passwd ../../../../wp-config.php ../../../../../../var/log/apache2/access.log (for log poisoning)Execute the attack: Send the crafted request using
curl:curl "http://target.com/?nasa_action=load_template&template=../../../../etc/passwd"Read output: The file content will be displayed in the response.
Note: No public exploit code is available, but the technique is standard LFI.
Blue Team
Detection & Response:
Monitor web server logs for suspicious path traversal patterns:
\.\./sequences- Requests to
/etc/passwd,/wp-config.php, etc. - Unusual parameters like
template=,file=,page=.
Deploy WAF rules to block path traversal:
- Block requests containing
../or..\\. - Block requests to known sensitive files.
- Block requests containing
Harden the server:
- Disable
allow_url_includeinphp.ini. - Use
open_basedirto restrict file access. - Keep the plugin updated to version 6.4.4 or later.
- Disable
Indicators of Compromise (IOCs)
File paths accessed:
/etc/passwd/etc/shadow/wp-config.php/var/log/apache2/access.log/proc/self/environ
URL patterns:
?nasa_action=load_template&template=?action=nasa_load&file=?page=../../../../
Log entries:
GET /?nasa_action=load_template&template=../../../../etc/passwdGET /wp-admin/admin-ajax.php?action=nasa_load&file=../../../../wp-config.php
Detection Engineering
YARA Rule
rule CVE_2025_39507_Nasa_Core_LFI {
meta:
description = "Detects attempts to exploit CVE-2025-39507 LFI in Nasa Core plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-39507"
strings:
$path_traversal = /\.\.\/|\.\.\\/
$sensitive_file = /etc\/passwd|wp-config\.php|proc\/self\/environ/
$vuln_param = /nasa_action|nasa_load|template=|file=/
condition:
any of ($path_traversal) and any of ($sensitive_file) and any of ($vuln_param)
}
Sigma Rule
title: CVE-2025-39507 Nasa Core LFI Detection
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP requests attempting to exploit LFI in Nasa Core plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains:
- 'nasa_action=load_template'
- 'action=nasa_load'
- 'template='
- 'file='
cs-uri-query|contains:
- '../'
- '..\\'
- '/etc/passwd'
- '/wp-config.php'
condition: selection
falsepositives:
- Legitimate use of similar parameters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-39507 Nasa Core LFI Attempt"; flow:to_server,established; content:"GET"; http_method; content:"nasa_action=load_template"; http_uri; content:"../"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update the plugin to version 6.4.4 or later if a patch becomes available.
- If no patch is available, disable or remove the Nasa Core plugin until a fix is released.
- Implement a Web Application Firewall (WAF) rule to block path traversal patterns.
- Restrict file access using PHP
open_basedirand disableallow_url_include.
Long-term Measures:
- Regularly update all WordPress plugins and themes.
- Conduct code reviews for custom plugins to ensure input validation.
- Monitor vendor channels for security advisories.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
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.