Citrix Bleed
Citrix Bleed made NetScaler gateways return memory holding the session tokens of people already signed in. With a token an attacker took over the session with no password and no MFA, and patching did not end the sessions already stolen.
- Affected
- NetScaler 13.0, 13.1 and 14.1 before the October 2023 builds
- Fixed in
- 14.1-8.50, 13.1-49.15, 13.0-92.19
- Published
- 2023-10-10
- Known exploited since
- 2023-10-18
What Citrix Bleed is
A NetScaler appliance set up as a VPN or login gateway could be made, by one unauthenticated request, to return a chunk of its memory. That memory held valid session tokens of signed-in users.
A stolen token is a session, not a password: the attacker is already past the password and MFA.
Spot it in the logs
Mia signed in once. Which request stole her session?
The leaking request has an abnormal Host header, visible in WAF or proxy logs in front of the gateway. The hijacking shows up as one user's session used from two or more addresses, with only one sign-in.
How the attack works
- 1The attacker sends a request with a huge Host header
- 2The gateway returns a chunk of its memory
- 3The memory holds signed-in users' session tokens
- 4The attacker uses a token: no password, no MFA
Why Citrix Bleed was so severe
A NetScaler Gateway is the front door of a company network: staff reach their VPN, virtual desktops and internal apps through it, so it has to answer anyone on the internet. Citrix Bleed lived in a page the gateway serves before anyone signs in, so one web request with no account was enough. The memory it returned could hold a valid NetScaler AAA session cookie. AAA stands for authentication, authorization and accounting, and the cookie is what tells the gateway a user has already passed their password and MFA check. With it, the attacker simply continued that user's session.
The root cause was small. Researchers at Assetnote found that the code building the gateway's OpenID configuration reply trusted the length that the C function snprintf reports, which is the length the text would need, not the length actually written. When the reply grew past its 131,072 byte buffer, the gateway sent the bytes that came after it in memory. This is called a buffer over-read: reading past the end of a block of memory. In Assetnote's example reply, about 16 KB more than the buffer came back. Mandiant notes that the leak does not crash the appliance, so nothing obvious happens on the owner's side.
Three things made it hard to contain. Mandiant found it was exploited as a zero-day from late August 2023, about six weeks before the fix. Mandiant also found that the NetScaler web server does not log requests to the vulnerable page, so many owners had no record of the leak. And patching did not cancel sessions that were already stolen. Weeks after the fix, unpatched gateways were still common: Kevin Beaumont counted around 5,000 unpatched servers on November 7, 2023, and researcher Yutaka Sejiyama counted more than 10,400 vulnerable servers on November 14, nearly 30% of them in the United States, according to Tenable.
Is your version affected?
- NetScaler command line
show ns version
Affected. Upgrade to 13.1-49.15 / 14.1-8.50.
How to detect Citrix Bleed
Citrix, Mandiant and CISA published these ways to spot both the memory leak and the session hijacking that follows.
- Compare Client_ip and Source in ns.logThe gateway writes SSLVPN TCPCONNSTAT events to /var/log/ns.log, or to your syslog server. Each one names the User, the Client_ip that signed in and the Source address now using the session. A Source that does not match the Client_ip, especially from an unusual country or network, can be a hijacked session; roaming users switching Wi-Fi or VPN can cause harmless mismatches.
- Look for one address using many users' sessionsIn the same TCPCONNSTAT events, check whether a single Source address uses sessions belonging to several different users within a short time. CISA also suggests flagging VPN users tied to two or more public IP addresses in different subnets or far-apart locations. Shared NAT addresses can explain some matches, so confirm before acting.
- Search WAF or proxy logs for long Host headersThe vulnerable pages are /oauth/idp/.well-known/openid-configuration and /oauth/rp/.well-known/openid-configuration. NetScaler itself does not log requests to them, so use a web application firewall or network device in front of it. Requests to those paths with an abnormally long Host header are the sign of exploitation attempts.
- Keep enough logs to look backBy default ns.log keeps 25 files of 100 KB per log type, about 2.5 MB in total, which Mandiant warns may not cover the period you need to investigate. Forward NetScaler logs to a syslog server or SIEM so the TCPCONNSTAT history survives.
- Examine memory core dumps before rebootingOn an unpatched appliance, core dumps of the NSPPE packet engine process are kept in /var/core. Mandiant looked for very long readable strings, over 120,000 characters and more than 99% the character 0, which match an oversized Host header. Collecting them needs over 5 GB of free disk space and no reboot first, and Mandiant notes they cannot tell a failed attempt from a successful one.
- Hunt for what the intruder did nextOn Citrix virtual desktops, Mandiant checks the registry keys under HKLM\SOFTWARE\Policies\Citrix\<session>\Evidence for the ClientName and ClientIP of each session, where a default hostname like DESKTOP-######## is a warning sign. CISA advises looking for new remote access tools, new accounts, commands such as whoami, quser and net, mshta.exe called with web addresses, and files like adobelib.dll in C:\Users\Public.
Check a log line
Search the logs yourself
Find the request that leaked Mia's session.
Fix it, in this order
- 1Patch the gatewayInstall the fixed build. There is no workaround.
- 2End every sessionTokens stolen before the patch still work. A password reset does not end them.
- 3Check what they didReview what the hijacked sessions accessed, and close anything they created.
Vulnerabilities related to Citrix Bleed
Timeline
- 2023-10-10NetScaler releases the fix
- 2023-10-18CISA lists it as exploited
- 2023-11-21CISA reports LockBit 3.0 affiliates using it, including against Boeing Distribution
Citrix Bleed attacks in the wild
Mandiant tracked four separate unnamed groups using the flaw against legal and professional services, technology and government organizations in the Americas, Europe, the Middle East, Africa and Asia Pacific. After taking over sessions they ran network discovery, stole credentials with Mimikatz and memory dumps of LSASS (the Windows process that holds logon secrets), and installed remote access tools such as Atera, AnyDesk and SplashTop. One group deployed FREEFIRE, a .NET backdoor that used Slack to receive commands. Tenable also lists the Medusa ransomware group among the attackers.
LockBit 3.0 ransomware affiliates used it widely. In advisory AA23-325A of November 21, 2023, CISA, the FBI, MS-ISAC and Australia's ACSC described how affiliates broke into Boeing Distribution Inc., Boeing's parts and distribution business, through Citrix Bleed. Boeing shared the indicators. The affiliates installed tools such as AnyDesk, Splashtop and ScreenConnect, ran a PowerShell script named 123.ps1 that wrote C:\Users\Public\adobelib.dll, created a scheduled task called UpdateAdobeTask, and used a renamed copy of Plink (servicehost.exe) to tunnel traffic.
Other victims followed. ICBC Financial Services, the US arm of the Industrial and Commercial Bank of China, was hit by ransomware on November 8, 2023, which disrupted its clearing of US Treasury trades. News outlets reported LockBit was behind it, and Beaumont pointed out that an ICBC NetScaler had still been unpatched for Citrix Bleed days before, a likely but unconfirmed way in. Comcast's Xfinity said attackers exploited the Citrix flaw between October 16 and 19, 2023, after the patch was available, and its Maine filing lists 35,879,455 people. The stolen data included usernames and hashed passwords.
Who found Citrix Bleed
Citrix says its own internal team found the flaw. Cloud Software Group, Citrix's owner, published bulletin CTX579459 with fixed builds on October 10, 2023, together with a second flaw, CVE-2023-4967. At that point it knew of no attacks. On October 17, Citrix updated its alert to say exploitation had been seen, and Mandiant reported the same day that attacks had started in late August. CISA added the CVE to its Known Exploited Vulnerabilities catalog on October 18.
The name came from Assetnote (now part of Searchlight Cyber). Its researcher Dylan Pindur compared a patched and an unpatched build, published a technical analysis dated October 24, 2023, and released a proof of concept. Tenable credits Assetnote with the name Citrix Bleed; security researcher Kevin Beaumont drew its logo. Citrix reports that the Shadowserver Foundation saw a sharp increase in exploitation attempts against unpatched appliances on October 25.
Lessons from Citrix Bleed
Citrix Bleed showed that MFA protects the sign-in, not the session that follows it. Once a session token leaks, the password and the second factor are already behind the attacker, which is why CISA warned that MFA would not work as intended here. A fix for this kind of flaw has two halves: install the patch, then end every active and persistent session so stolen tokens stop working. Citrix's own guidance lists the commands kill aaa session -all, kill icaconnection -all, kill rdp connection -all, kill pcoipConnection -all and clear lb persistentSessions.
It also showed how little many teams could see at their own edge. The appliance did not log the attack and kept only a few megabytes of its own logs. Defenders who had forwarded gateway logs, kept a WAF in front of it, and watched for one session used from two places were the ones who could answer the question of whether they had been hit. CISA's Citrix Bleed advisory asks organizations to patch within 24 to 48 hours of disclosure; in this case, Shadowserver saw exploitation attempts jump about two weeks after the fix.
The case
Citrix Bleed: The Gateway
- Find what the advisory affects
- Whose session is it?
- Get the intruder out
Questions
Does resetting the password stop a Citrix Bleed attacker?
No. The attacker holds a session token, not the password. End the sessions on the gateway after patching.
Why do NVD and Citrix score it differently?
NVD rates it 7.5 (high) and Citrix, the vendor, 9.4 (critical). Both describe the same flaw.
What is Citrix Bleed?
Citrix Bleed is CVE-2023-4966, a flaw in NetScaler ADC and NetScaler Gateway. When the appliance works as a VPN or login gateway, one unauthenticated request can make it return part of its memory, which may contain a signed-in user's session cookie. An attacker can use that cookie to take over the session without a password or MFA.
Has Citrix Bleed been patched?
Yes. Citrix released fixed builds on October 10, 2023: 14.1-8.50, 13.1-49.15 and 13.0-92.19, plus 13.1-37.164 for 13.1-FIPS and 12.1-55.300 for 12.1-FIPS and 12.1-NDcPP. Version 12.1 is end of life and gets no fix, so CISA says to upgrade it to a supported version.
Is Citrix Bleed still a threat?
A gateway on a fixed build, with old sessions cleared, is not vulnerable to this flaw. Unpatched or end-of-life appliances still are. A very similar flaw, CVE-2025-5777 or Citrix Bleed 2, was disclosed and exploited in 2025, so the same checks still apply.
Which NetScaler setups are affected by Citrix Bleed?
Customer-managed appliances set up as a Gateway (VPN virtual server, ICA Proxy, CVPN or RDP Proxy) or as an AAA virtual server. Appliances used only for traditional load balancing, NetScaler ADM, Citrix SD-WAN and Citrix-managed cloud services are not affected, according to Citrix.
How do I check if I was hit by Citrix Bleed?
Look in ns.log or your syslog server for SSLVPN TCPCONNSTAT events where Client_ip and Source differ, or where one Source uses several users' sessions. Check WAF logs for requests to /oauth/idp/.well-known/openid-configuration with very long Host headers. If you find signs, assume compromise and investigate what those sessions accessed.
Who named Citrix Bleed?
Tenable credits the researchers at Assetnote, who published the first technical analysis in October 2023. Kevin Beaumont created its logo, and in 2025 he gave the follow-up flaw CVE-2025-5777 the name Citrix Bleed 2.