MODRACXKENNETH D'SILVA

← Archive & Insights

CitrixBleed (CVE-2023-4966) & the 2023 Network Appliance Exploit Wave

A memory disclosure bug in Citrix NetScaler that leaked session tokens — no authentication required. LockBit and other ransomware groups weaponised it within weeks. Plus Cisco IOS XE, Juniper, and Ivanti in the same year.

By Kenneth D'SilvaReading Time: 28 min readCategory: Security & Compliance

1. The Collapse of the Edge Perimeter

For over a decade, phishing and credential stuffing were the primary initial compromise vectors for corporate breaches. In 2023, that paradigm shifted entirely. Ransomware cartels (LockBit 3.0, AlphV, Medusa) pivoted aggressively toward zero-day vulnerabilities in perimeter network appliances: SSL VPNs and Application Delivery Controllers (ADCs).

The most consequential was CitrixBleed (CVE-2023-4966), an unauthenticated memory disclosure vulnerability in Citrix NetScaler ADC and Gateway. It allowed attackers to bypass Multi-Factor Authentication (MFA) and hijack active employee sessions by scraping raw kernel memory over HTTP.

2. 2023 Perimeter Appliance CVE Matrix

Appliance / VendorCVE IDCVSSExploit Mechanism
Citrix NetScaler ADC / GatewayCVE-2023-4966 (CitrixBleed)9.4Unauthenticated Memory Disclosure / Session Token Hijacking
Cisco IOS XECVE-2023-20198 + 2027310.0Unauth Admin Account Creation + Command Injection Chain
Palo Alto Networks PAN-OSCVE-2024-340010.0OS Command Injection in GlobalProtect Gateway via SESSID Cookie
Ivanti Connect Secure (Pulse)CVE-2023-46805 + 2024-218879.1Auth Bypass + Command Injection Chain

3. Technical Anatomy: How NetScaler Leaked Session Tokens

When configured as an OpenID Connect (OIDC) or SAML endpoint, NetScaler processes the /oauth/idp/.well-known/openid-configuration URI. During response formatting, NetScaler calculated memory bounds incorrectly when handling excessively long Host headers (> 20,000 characters):

GET /oauth/idp/.well-known/openid-configuration HTTP/1.1
Host: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa... [Repeated 20,000+ chars]
Connection: close

The response returned valid JSON followed by raw kernel memory chunks containing active 32-character hexadecimal session tokens (NSC_AAAC / NSC_TMAS). Because these tokens represented sessions created after MFA was successfully passed, inserting the stolen cookie into a browser granted immediate network access without triggering password or TOTP challenges.

4. Why Patching Alone Was Insufficient

Installing the firmware update patched the memory leak but did not terminate active sessions. Attackers who harvested session cookies continued logging into networks for weeks post-patch. Remediation required a mandatory two-step protocol:

# 1. Apply firmware update
# 2. Force termination of all active sessions via NetScaler CLI:
nscli
kill aaa session -all
kill icaconnection -all

Suggested & Related Reading

Explore related engineering guides from Kenneth D'Silva: