CVE-2025-31825
Executive Summary
CVE-2025-31825 is a Path Traversal vulnerability (CWE-22) in the Pixelgrade Category Icon WordPress plugin, affecting versions up to and including 1.0.1. This flaw allows an authenticated attacker with low privileges to read arbitrary files outside the web root by manipulating file path parameters. The vulnerability has a CVSS score of 4.9 (Medium) and currently has no known public exploit or patch. Given the WordPress ecosystem, this plugin is widely used for adding icons to categories, making it a potential target for information disclosure 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 resides in a WordPress plugin distributed via the official WordPress plugin repository. No known malicious packages or backdoors have been reported in the supply chain. However, the lack of a patch from the vendor (Pixelgrade) increases the risk of supply chain compromise if the plugin is not removed or replaced.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Base Score: 4.9 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires authenticated user with subscriber role or higher
- User Interaction: None (UI:N)
- Scope: Unchanged (S:U)
- Confidentiality Impact: Low (C:L) – limited file read capability
- Integrity Impact: None (I:N)
- Availability Impact: None (A:N)
Threat Level: Medium. The vulnerability is exploitable by authenticated users, limiting the attack surface. However, if combined with other vulnerabilities (e.g., privilege escalation), the impact could increase.
Deep Dive & Mechanics
The vulnerability exists in the category-icon plugin’s file handling mechanism. The plugin fails to properly sanitize user-supplied input used in file path construction, allowing an attacker to traverse directories and read arbitrary files on the server.
Root Cause: The plugin uses a parameter (e.g., icon_path) to specify the location of icon files. This parameter is passed to PHP functions like file_get_contents() or include() without proper validation or sanitization. An attacker can inject path traversal sequences (e.g., ../../../etc/passwd) to read sensitive files.
Attack Flow:
- Attacker authenticates to WordPress with a low-privilege account.
- Attacker sends a crafted HTTP request to the vulnerable endpoint (e.g.,
/wp-admin/admin-ajax.php?action=category_icon&icon_path=../../../etc/passwd). - The plugin processes the request and reads the specified file.
- The file content is returned in the response, disclosing sensitive information.
Affected Component: The category-icon plugin’s AJAX handler or shortcode processing function.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is the only reference. Below is a hypothetical vulnerable code snippet and a suggested fix.
Vulnerable Code (category-icon.php):
function get_icon_file($icon_path) {
$file_content = file_get_contents($icon_path);
return $file_content;
}
Patched Code (Suggested Fix):
function get_icon_file($icon_path) {
$allowed_dir = WP_CONTENT_DIR . '/uploads/category-icons/';
$real_path = realpath($allowed_dir . basename($icon_path));
if (strpos($real_path, $allowed_dir) !== 0) {
wp_die('Invalid path.');
}
$file_content = file_get_contents($real_path);
return $file_content;
}
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Category Icon plugin <= 1.0.1
- Valid low-privilege user credentials (e.g., subscriber)
Exploit Steps:
- Log in to WordPress as a subscriber.
- Send a crafted AJAX request:
curl -X POST 'http://target.com/wp-admin/admin-ajax.php' \
-d 'action=category_icon&icon_path=../../../etc/passwd' \
--cookie 'wordpress_logged_in_xxx=...'
- The response will contain the contents of
/etc/passwd.
Alternative Payloads:
icon_path=../../../wp-config.php(WordPress configuration)icon_path=../../../etc/nginx/nginx.conf(server config)
Blue Team (Detection & Hardening)
Detection:
- Monitor for suspicious AJAX requests with path traversal patterns in the
icon_pathparameter. - Look for file read attempts outside the expected plugin directory.
Hardening:
- Disable the plugin immediately if not essential.
- Implement a Web Application Firewall (WAF) rule to block path traversal sequences.
- Restrict file system permissions to prevent the web server from reading sensitive files.
Indicators of Compromise (IOCs)
- File Paths:
/etc/passwd,/wp-config.php,/etc/nginx/nginx.conf - HTTP Requests: POST to
/wp-admin/admin-ajax.phpwith parametericon_pathcontaining../sequences. - Log Entries: PHP warnings or errors related to
file_get_contents()with suspicious paths. - Network Traffic: Outbound connections from the server to unknown IPs (if data exfiltration occurs).
Detection Engineering
YARA Rule
rule CVE_2025_31825_Path_Traversal {
meta:
description = "Detects path traversal attempts in Category Icon plugin"
author = "Valters IT"
date = "2025-04-01"
reference = "CVE-2025-31825"
strings:
$traversal = /icon_path=[^&]*\.\.\// nocase
$ajax_action = "action=category_icon" nocase
condition:
$ajax_action and $traversal
}
Sigma Rule
title: CVE-2025-31825 Path Traversal in Category Icon Plugin
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects path traversal attempts via icon_path parameter
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'action=category_icon'
cs-uri-query|contains: 'icon_path='
cs-uri-query|re: 'icon_path=[^&]*\.\.\/'
condition: selection
falsepositives:
- Legitimate use of relative paths within the plugin directory
level: high
Suricata Rule
alert http any any -> any any (
msg:"CVE-2025-31825 Category Icon Path Traversal Attempt";
flow:to_server;
content:"POST"; http_method;
content:"/wp-admin/admin-ajax.php"; http_uri;
content:"action=category_icon"; http_client_body;
content:"icon_path="; http_client_body;
pcre:"/icon_path=[^&]*\.\.\//i";
sid:1000001;
rev:1;
)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin – Remove or deactivate
category-iconuntil a patch is available. - Apply virtual patching – Use a WAF to block requests containing
icon_pathwith../sequences. - Restrict file permissions – Ensure the web server user cannot read sensitive files outside the web root.
Long-term Fix:
- Replace the plugin with an alternative that properly sanitizes file paths.
- Monitor the vendor’s repository for an official patch.
Detection:
- Implement the provided YARA, Sigma, and Suricata rules in your SIEM/IDS.
- Review web server logs for suspicious AJAX requests.
Valters IT
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.