SecPod

Learn Search

Search across all Learn content

← Back to Security Research
RelayState Ruse: Exploiting Reflected XSS in Citrix NetScaler

RelayState Ruse: Exploiting Reflected XSS in Citrix NetScaler

In the realm of cybersecurity, it’s not uncommon to stumble upon vulnerabilities while dissecting a system during the pursuit of reproducing an N-day. Security researchers at watchTowr Labs recently encountered such a scenario while analyzing CitrixBleed2 (CVE?2025?5777), which affected Citrix NetSc...

Nov 12, 2025By Meghana Raatni3 min read

In the realm of cybersecurity, it’s not uncommon to stumble upon vulnerabilities while dissecting a system during the pursuit of reproducing an N-day. Security researchers at watchTowr Labs recently encountered such a scenario while analyzing CitrixBleed2 (CVE?2025?5777), which affected Citrix NetScaler appliances. During their analysis, they identified two vulnerabilities: a memory leak (WT-2025-0089) and a reflected cross-site scripting (XSS) vulnerability (CVE-2025-12101 or WT-2025-0090). While the memory leak was deemed a non-issue by Citrix, the reflected XSS vulnerability poses a potential risk.

Vulnerability Details

The identified reflected XSS vulnerability, CVE-2025-12101, exists within the single sign-on (SSO) flows of Citrix NetScaler, specifically affecting the RelayState parameter. This parameter is used during the authentication process to maintain the user’s session state between the identity provider and the service provider. The vulnerability arises due to the improper handling of the RelayState parameter at the /cgi/logout endpoint.

The attack can be carried out via a Cross-Site Request Forgery (CSRF) attack, since the /cgi/logout endpoint accepts HTTP POST requests that include a valid SAMLResponse and a modified RelayState. By crafting a malicious HTTP POST request, an attacker can inject arbitrary HTML and JavaScript code into the RelayState parameter to be executed within the user’s browser session.

Proof of Concept (PoC)

The following HTTP POST request demonstrates how to trigger the XSS vulnerability by injecting JavaScript code into the RelayState parameter:

block
POST /cgi/logout HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Host: target
Content-Type: application/x-www-form-urlencoded
Content-Length: 1629
SAMLResponse=[BASE64-SAML-Response]&RelayState=<@base64><https://<custom-domain>.com/></@base64>

Affected Products

The reflected XSS vulnerability CVE-2025-12101 affects the following products:

  • NetScaler ADC and NetScaler Gateway? 14.1?before 14.1-56.73
  • NetScaler ADC and NetScaler Gateway? 13.1?before 13.1-60.32
  • NetScaler ADC 13.1-FIPS and NDcPP before 13.1-37.250-FIPS and NDcPP
  • NetScaler ADC 12.1-FIPS and NDcPP before 12.1-55.333-FIPS and NDcPP

Citrix NetScaler ADC and Gateway are application delivery and security appliances that provide load balancing, traffic management, and security features for web applications.

Impact & Exploit Potential

Successful exploitation of the reflected XSS vulnerability CVE-2025-12101 could have significant consequences. An attacker could execute arbitrary JavaScript code within the context of the user’s session, leading to:

  • Session hijacking: Gaining unauthorized access to a user’s session and sensitive data.
  • Defacement: Altering the appearance of the web page to mislead or harm users.
  • Redirection to malicious sites: Redirecting users to phishing or malware distribution sites.

Mitigation & Recommendations

Upgrade your Citrix products to the patches given by the vendor:

  • NetScaler ADC and NetScaler Gateway 14.1-56.73, 13.1-60.32 or later
  • NetScaler ADC 13.1-FIPS and NDcPP 13.1-37.250 or later
  • NetScaler ADC 12.1-FIPS and NDcPP 12.1-55.333 or later

Instantly Fix Risks with Saner Patch Management

Saner patch management is a continuous, automated, and integrated software that instantly fixes risks exploited in the wild. The software supports major operating systems like Windows, Linux, and macOS, as well as 550+ third-party applications.

It also allows you to set up a safe testing area to test patches before deploying them in a primary production environment. Saner patch management additionally supports a patch rollback feature in case of patch failure or a system malfunction.

Experience the fastest and most accurate patching software here.

Featured Posts

Open Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions
Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions

CVE Research

Patch Analysis & Exploitation Timeline: Seven CVEs, Two Remediation Tracks, CISA's September 2, 2026 KEV Additions

An analysis of seven vulnerabilities added to the CISA Known Exploited Vulnerabilities catalog on September 2, 2026, covering vulnerability types, remediation deadlines, and patch prioritization considerations.

Sep 18, 2026

Open Top Vulnerability Scanning Tools 2024

Top Vulnerability Scanning Tools 2024

CVE Research

Top Vulnerability Scanning Tools 2024

According to statistics, a new cyberattack was detected every 39 seconds in 2023! With this rise in number of attacks, protecting sensitive data becomes crucial and challenging. To protect IT, vulnerability scanners are the lead at defense, actively identifying weaknesses within systems and networks

Sep 17, 2026

Open The Webm Zero-Days: All Over The Wild

The Webm Zero-Days: All Over The Wild

CVE Research

The Webm Zero-Days: All Over The Wild

Webmproject, a popular media file format, has been experiencing hardships in security. Two of its libraries, libwebp and libvpx, have been found to contain zero-day vulnerabilities that affect multiple commonly used software products, such as Chrome, Edge, Tor, Telegram, and more! The two notorious

Sep 17, 2026

Open The Ultimate Vulnerability Assessment Checklist

The Ultimate Vulnerability Assessment Checklist

CVE Research

The Ultimate Vulnerability Assessment Checklist

Vulnerability assessment is the process of identifying and assessing vulnerabilities. It makes up for a significant chunk of vulnerability management, and vulnerability management relies heavily on it. Without properly assessing vulnerabilities, your vulnerability management program might fail to me

Sep 17, 2026