← Back to Feed CACHED · 2026-07-02 19:54:30 · CACHE_KEY CVE-2025-5777
CVE-2025-5777 · CWE-125 · Disclosed 2025-06-17

Insufficient input validation leading to memory overread when the NetScaler is configured as a Gateway

ASSESSED — NOISGATE V0.5
Vendor
Reassessed
Verdict:
Do you agree?
01 · The Real Story

It's CitrixBleed, again — the same wound in the same appliance, two years later

CVE-2025-5777 is an out-of-bounds read in NetScaler ADC and NetScaler Gateway when configured as a Gateway (VPN vserver, ICA Proxy, CVPN, RDP Proxy) or as an AAA virtual server. An unauthenticated attacker sends a crafted POST to the login endpoint (/p/u/doAuthentication.do) without a login= parameter body, and the appliance echoes back ~127 bytes of uninitialized stack memory in the <InitialValue> XML field. Repeat the request a few thousand times and you harvest session cookies, credentials, and MFA tokens straight out of TLS memory. Affected: NetScaler ADC/Gateway 14.1 before 14.1-43.56, 13.1 before 13.1-58.32, and all 13.1-FIPS/NDcPP before 13.1-37.235-FIPS. 12.1 and 13.0 are EOL and will not be patched — those appliances are permanently broken.

The vendor's HIGH / 7.5 rating is materially wrong and Citrix knows it. The CVSS vector claims *Confidentiality: High, Integrity: None, Availability: None* — but a leaked authenticated session token collapses directly to Integrity:High and Availability:High because the attacker inherits *whatever the hijacked user could do*, including admin. This is the textbook replay of CVE-2023-4966 (CitrixBleed 1) which enabled the LockBit/Boeing/Comcast/ICBC intrusions. CISA added it to KEV on 2025-07-10; watchTowr, Horizon3, and Assetnote published working PoCs; Shadowserver logged mass exploitation from mid-June 2025. Treat vendor severity as marketing, not signal.

"CitrixBleed 2. KEV-listed, mass-exploited, session tokens leaking from your edge. Patch yesterday."
02 · The Attack Path

5 steps from start to impact.

STEP 01

Identify an exposed NetScaler Gateway

Attacker fingerprints public NetScaler Gateway / AAA vservers via TLS cert CN, /vpn/index.html, /logon/LogonPoint/, or the NSC_ cookie namespace. Shodan and Censys both dork this trivially; roughly 56,000–60,000 appliances are reachable from the public internet.
Conditions required:
  • Appliance is internet-exposed
  • Gateway or AAA vserver role is enabled (not just LB/CS)
Where this breaks in practice:
  • Pure load-balancer configurations without a Gateway/AAA vserver are NOT vulnerable
  • Some tenants front NetScaler behind a WAF/CDN with URI filtering
Detection/coverage: Shodan http.favicon.hash:-1292923998, Censys services.tls.certificates.leaf_data.subject.common_name:*netscaler*, GreyNoise tag Citrix NetScaler Memory Disclosure Attempt
STEP 02

Send malformed doAuthentication POST

Attacker issues POST /p/u/doAuthentication.do with Content-Type: application/x-www-form-urlencoded and a body containing login without a value or without the = sign. The server parses the missing field, allocates the response buffer, and echoes uninitialized stack memory inside the <InitialValue>...</InitialValue> tag of the XML SAML/nFactor response. Public PoC: watchTowr/CitrixBleed-2, Horizon3 Attack Team, and Assetnote blog + Nuclei template.
Conditions required:
  • Reachable HTTPS to the Gateway vserver
Where this breaks in practice:
  • None — no auth, no user interaction, no rate limit by default
Detection/coverage: Suricata/ET rule SID 2059421+, Citrix ADC responder policy from vendor mitigation kit, Nuclei citrix-netscaler-memory-leak.yaml
STEP 03

Loop to harvest secrets

Each request yields ~127 bytes of stack. Attackers script a loop of a few thousand requests to collect a corpus, then grep for NSC_AAAC, NSC_TMAS, JSON web tokens, base64-encoded credentials, and cleartext passwords submitted by concurrent legitimate users. Horizon3's PoC pulls a usable session token in under 15 minutes against a moderately-trafficked box.
Conditions required:
  • Live user traffic on the appliance (more users = faster loot)
  • No rate limiting on the login endpoint
Where this breaks in practice:
  • Idle appliances leak slower — stack is stale
  • Some deployments have AppFW rate-limit policies
Detection/coverage: High-volume doAuthentication.do from a single source without corresponding successful auth is a strong indicator
STEP 04

Replay session cookie, bypass MFA entirely

Attacker imports the stolen NSC_AAAC cookie into Burp/Chrome and lands directly inside the authenticated Gateway session — no username, no password, no MFA prompt. If the hijacked session belongs to an admin, they own the appliance; if it belongs to a VPN user, they inherit that user's network position. Tool: CitrixBleed-2 exploit (watchTowr), projectdiscovery/nuclei-templates.
Conditions required:
  • A valid session existed in the leaked memory window
  • Session hasn't idled out
Where this breaks in practice:
  • Short session timeouts (< 15 min) reduce yield
  • Source-IP-bound sessions (rare) break replay
Detection/coverage: Session cookie used from a new geographic IP / ASN — feed NetScaler auth logs to SIEM
STEP 05

Pivot to internal network

With a hijacked Gateway session the attacker reaches published intranet apps, RDP/ICA farms, and internal fileshares as the compromised user. If an admin session was hijacked, they can add local users, exfil the config (containing LDAP bind creds and RADIUS shared secrets), and use the appliance as a persistent C2 foothold — exactly the CitrixBleed 1 playbook.
Conditions required:
  • ICA Proxy / VPN full-tunnel or split-tunnel exposes internal resources
Where this breaks in practice:
  • Well-segmented tenants restrict Gateway users to a jump host — most do not
Detection/coverage: Impossible-travel on VPN logon, new admin creation, config export events
03 · Intelligence Metadata

The supporting signals.

In-the-wildActive mass exploitation since mid-June 2025 per Shadowserver and ReliaQuest; multiple ransomware affiliates observed pivoting through hijacked sessions
Public PoCwatchTowr, Horizon3 Attack Team writeup, Assetnote analysis, Nuclei template merged upstream
EPSS0.99897 (top 0.1% of all CVEs) — model is screaming
CISA KEVListed 2025-07-10 with a 21-day federal remediation deadline
CVSS vectorAV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N — network, no auth, no UI. I:N and A:N are wrong; session hijack drives both to High
Affected versionsNetScaler ADC/Gateway 14.1 < 14.1-43.56, 13.1 < 13.1-58.32, 13.1-FIPS/NDcPP < 13.1-37.235; 12.1 and 13.0 are EOL — no patch coming
Fixed versions14.1-43.56, 13.1-58.32, 13.1-37.235-FIPS/NDcPP. Kill all sessions post-upgrade: kill icaconnection -all and kill pcoipConnection -all and kill aaa session -all
Exposure~56,000–60,000 internet-facing NetScaler Gateways per Shodan; ~1,200 still unpatched in Fortune 500 ASNs per Censys as of late June 2025
Disclosed2025-06-17 by Citrix advisory CTX693420, coordinated with Positive Technologies
ReporterPositive Technologies (initial disclosure); reverse-engineered patch diff by watchTowr Labs and Horizon3
04 · The Call

noisgate verdict.

Final Verdict
UPGRADED to CRITICAL (9.8/10)

Unauthenticated pre-auth memory disclosure on an internet-facing identity/edge appliance with confirmed mass exploitation and KEV listing is the single most decisive factor — this is a canonical high-value-role component (network edge + identity gateway) and the leaked bytes are session tokens that collapse directly into MFA bypass. The vendor's I:N / A:N framing understates impact because a hijacked admin session yields full appliance takeover, which is why the reassessed score sits at 9.8 rather than 7.5.

HIGH Exploitability and public tooling
HIGH In-the-wild exploitation attribution
HIGH Affected-version accuracy from vendor advisory

Why this verdict

  • KEV + active exploitation: listed 2025-07-10, Shadowserver telemetry confirms mass scanning and successful hits from mid-June onward
  • Role multiplier: NetScaler Gateway is a canonical high-value-role component — it IS the identity edge. Chain succeeds → attacker inherits any user's authenticated session including admin → fleet floor is CRITICAL
  • No friction on the reach step: unauthenticated, single POST, no UI, no rate limit by default; ~60k appliances directly exposed
  • Vendor CVSS is under-scored: I:N/A:N ignores that the leaked data IS the session token; realistic vector is C:H/I:H/A:H → 9.8
  • Session-token replay defeats MFA: the token was minted post-MFA, so hardware keys, OTP, and push MFA provide zero defense against replay
  • Historical precedent: CitrixBleed 1 (CVE-2023-4966) drove LockBit's biggest 2023 campaign — same class, same appliance, same outcome

Why not higher?

9.8 is effectively the ceiling for a remote unauthenticated compromise of a widely-deployed edge appliance; a 10.0 would require guaranteed pre-auth RCE with no preconditions, and this is a memory-disclosure primitive that requires live sessions to be present in the target's stack. Absent that live traffic, an idle appliance yields little.

Why not lower?

Downgrading to HIGH would require either narrow exposure (there are ~60k reachable devices — the opposite of narrow), the absence of a public PoC (there are three), or no in-the-wild use (KEV-listed with active campaigns). None of those conditions hold. The vendor's 7.5 is a scoring artifact, not a real-world risk statement.

05 · Compensating Control

What to do — in priority order.

  1. Patch to 14.1-43.56 / 13.1-58.32 / 13.1-37.235-FIPS immediately — This is the ONLY durable fix. Per noisgate mitigation SLA for CRITICAL + active KEV exploitation: patch within hours, not days. Schedule the maintenance window today.
  2. Kill all active sessions post-upgrade — Patching alone does not evict attackers who already stole tokens. On each appliance run kill aaa session -all, kill icaconnection -all, kill pcoipConnection -all, and rotate all admin passwords and any credentials that transited the box. Do this within the same maintenance window.
  3. If you cannot patch in <72h, disable the Gateway/AAA vserversdisable vserver <name> on any VPN, ICA Proxy, CVPN, RDP Proxy, or AAA vserver removes the attack surface entirely until the patch is applied. Yes, this breaks remote access; that is the correct trade under CRITICAL SLA.
  4. Deploy the Citrix responder policy from CTX693420 — Vendor-published responder policy blocks the malformed doAuthentication.do request pattern. Interim only — treat as a speed bump while you schedule the reboot, not a substitute for the patch.
  5. Hunt for indicators back to 2025-06-01 — Look for high-volume doAuthentication.do POSTs without matching saml/login completions, new admin accounts, config exports, and session cookies used from anomalous ASNs. Feed ns.log to your SIEM if you have not already.
  6. Rotate LDAP bind, RADIUS shared secrets, and any stored service credentials on the appliance — If an admin session was hijacked, show run exposes these secrets. Rotate them on the assumption of compromise for any appliance internet-exposed in June 2025.
What doesn't work
  • MFA on the Gateway — the stolen token was minted AFTER MFA succeeded; replay bypasses it entirely
  • IP allow-lists on the admin interface — the vulnerable endpoint is the user-facing /p/u/doAuthentication.do, not /nsconfig
  • Short password rotation — the leak yields session tokens, not passwords; rotating passwords does not invalidate active NSC_AAAC cookies
  • Web Application Firewall in default mode — signatures for this bug are recent (post-June 2025); confirm your WAF vendor shipped a rule and it is in *block* mode, not *log*
  • Upgrading 12.1 or 13.0 — they are EOL, there is no patched build; migrate to 14.1 or decommission
06 · Verification

Crowdsourced verification payload.

Run this from an auditor workstation with network reach to the appliance's Gateway vserver — not on the NetScaler itself. Invoke as ./check-citrixbleed2.sh https://gateway.example.com. Requires only curl and grep; no credentials. It sends the malformed doAuthentication POST and inspects the <InitialValue> field for leaked memory.

noisgate-verify.sh
BASHREAD-ONLYSAFE
#!/usr/bin/env bash
# noisgate verifier for CVE-2025-5777 (CitrixBleed 2)
# Usage: ./check-citrixbleed2.sh https://gateway.example.com
# Exit: 0 PATCHED, 1 VULNERABLE, 2 UNKNOWN
set -u

TARGET="${1:-}"
if [[ -z "$TARGET" ]]; then
  echo "Usage: $0 https://<netscaler-gateway>" >&2
  exit 2
fi

UA="noisgate-verifier/1.0"
ENDPOINT="${TARGET%/}/p/u/doAuthentication.do"

# Malformed body: 'login' key without value triggers the OOB read
RESPONSE=$(curl -sk --max-time 15 \
  -H "User-Agent: $UA" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -X POST --data "login" \
  "$ENDPOINT" 2>/dev/null)

RC=$?
if [[ $RC -ne 0 ]] || [[ -z "$RESPONSE" ]]; then
  echo "UNKNOWN: could not reach $ENDPOINT (curl rc=$RC)"
  exit 2
fi

# Fingerprint 1: must look like a NetScaler nFactor response
if ! grep -qiE "(InitialValue|NSC_|<Response|SAMLResponse)" <<< "$RESPONSE"; then
  echo "UNKNOWN: response does not look like a NetScaler Gateway (is a Gateway/AAA vserver bound here?)"
  exit 2
fi

# Fingerprint 2: on VULNERABLE builds InitialValue is populated with junk
# even though we never supplied a login value. Extract it.
INITIAL=$(grep -oP '(?<=<InitialValue>).*?(?=</InitialValue>)' <<< "$RESPONSE" | head -1)

if [[ -n "$INITIAL" ]] && [[ "${#INITIAL}" -gt 0 ]]; then
  # Non-empty InitialValue on an unauth request = memory being echoed
  echo "VULNERABLE: $ENDPOINT returned non-empty <InitialValue> to unauthenticated request"
  echo "Leaked bytes (first 80): ${INITIAL:0:80}"
  exit 1
fi

# On patched builds InitialValue is absent or empty
if grep -qE "<InitialValue></InitialValue>|<InitialValue/>" <<< "$RESPONSE" || ! grep -q "InitialValue" <<< "$RESPONSE"; then
  echo "PATCHED: $ENDPOINT did not echo memory in <InitialValue>"
  exit 0
fi

echo "UNKNOWN: indeterminate response, inspect manually"
exit 2
07 · Bottom Line

If you remember one thing.

TL;DR
Stop reading and open a maintenance window. This is CRITICAL + KEV + mass-exploited, so the noisgate mitigation SLA is override-to-immediate: within hours, not the default 3-day CRITICAL window — either patch to 14.1-43.56 / 13.1-58.32 / 13.1-37.235-FIPS, or disable vserver on every Gateway/AAA vserver until you can. The noisgate remediation SLA of ≤90 days does not apply here — active exploitation collapses it to *today*. Immediately after upgrade, run kill aaa session -all plus the ICA/PCoIP kill commands, rotate LDAP bind + RADIUS shared secrets + admin passwords, and hunt ns.log back to 2025-06-01 for high-volume doAuthentication.do POSTs and session cookies used from anomalous ASNs. Any 12.1 or 13.0 appliance is EOL and cannot be patched — decommission or migrate this week.

Sources

  1. Citrix advisory CTX693420
  2. CISA KEV entry
  3. watchTowr Labs writeup + PoC
  4. Horizon3 Attack Team analysis
  5. Assetnote research
  6. NVD entry
  7. Shadowserver exploitation telemetry
  8. ReliaQuest exploitation report
Peer Review

What defenders are saying.

Submit a review attribution: handle + country only
0 flags selected · stored anonymously
Validation Results

Crowdsourced verification outputs.

Results submitted by users who ran the verification payload against their environment.