Skip to main content
Meet us at Black Hat USA 2026— Las Vegas, August 1–6Book a Meeting
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

Unauthenticated RCE in Citrix NetScaler ADC and Gateway

IdentifiersCVE-2023-3519CWE-94· Improper Control of Generation of…

CVE-2023-3519 is a critical unauthenticated remote code execution vulnerability affecting Citrix NetScaler ADC and NetScaler Gateway. The provided content states that exploitation is possible on customer-managed appliances when they are configured as a Gateway or AAA virtual server, including VPN virtual server, ICA proxy, CVPN, and RDP proxy deployments. Affected versions in the content include NetScaler ADC and Gateway 13.1 before 13.1-49.13 and 13.0 before 13.0-91.13; additional references also include 12.1 and certain FIPS/NDcPP builds. The flaw was exploited as a zero-day in June 2023 and publicly patched on July 18, 2023. Multiple sources in the content report automated exploitation at scale, with attackers implanting webshells on vulnerable NetScaler devices. Post-exploitation activity described in the content includes arbitrary command execution through webshells, deployment of ELF binaries, privilege escalation to root, access to NetScaler configuration files and decryption keys, recovery of stored Active Directory credentials, Active Directory enumeration, data collection, and exfiltration.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows an unauthenticated remote attacker to execute code on an exposed vulnerable NetScaler appliance. The content shows this was used in the wild to implant persistent webshells, execute arbitrary commands, escalate privileges to root, steal credentials, enumerate Active Directory, collect and exfiltrate sensitive data, and attempt lateral movement toward internal systems such as domain controllers. Because compromised webshells could persist after patching or rebooting, organizations that only applied updates without compromise assessment could remain backdoored. The vulnerability therefore enables both immediate edge-device compromise and durable post-compromise access for espionage, credential theft, and ransomware initial access.

Mitigation

If you can’t patch tonight, do this now.

The content states there are no effective workarounds for CVE-2023-3519 and that Web Application Firewall signatures do not fix the issue; patching is the primary mitigation. Additional defensive measures supported by the content include performing IOC checks even on already patched devices, using vendor and third-party IOC scanners, preserving forensic evidence before cleanup, isolating suspected compromised hosts, resetting credentials that may have been exposed, and reviewing ADC shell interfaces and logs for signs of exploitation. Strong network segmentation and restrictive firewalling around internet-facing NetScaler appliances can limit post-exploitation discovery and lateral movement, as demonstrated in reported incidents. Administrators should also monitor for known webshell paths, suspicious files under NetScaler web directories, anomalous outbound connections, and unauthorized changes to core build files.

Remediation

Patch, then assume compromise.

Upgrade affected NetScaler ADC and NetScaler Gateway appliances to fixed builds released by Citrix/Cloud Software Group. The content identifies fixed releases including 13.1-49.13 and later for 13.1, 13.0-91.13 and later for 13.0, and corresponding fixed FIPS/NDcPP builds referenced in the advisories. For affected 12.1 deployments mentioned in the content, upgrade to the vendor-provided fixed build where supported or migrate to a supported release if the branch is end-of-life. Because exploitation occurred in the wild before patch availability and webshells may persist after patching, remediation should also include compromise assessment, IOC scanning, preservation of forensic disk and memory evidence where feasible, removal of webshells and unauthorized files, reimaging or rebuilding compromised appliances, credential rotation for accounts exposed to the appliance, and investigation for downstream lateral movement.
PUBLIC EXPLOITS

Exploits

4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).

VALID 4 / 8 TOTALView more in app
CVE-2023-3519MaturityPoCVerified exploit

Repository contains a single Python exploit script (CVE-2023-3519.py) and a short README. Core exploit behavior: - Builds a malicious HTTP GET request to the Citrix endpoint /gwtest/formssso with parameters event=start and an overlong 'target' value. - The 'target' parameter is constructed as: 168 bytes of padding ('A' * 168) + a hardcoded return/gadget address (jmp_esp = 0x6d8c62, packed with pwntools p64) + URL-encoded shellcode bytes. - Writes the full HTTP request to a local file (payload.tmp) and sends it to the target over SSL on port 443 using a shell call to ncat. Payload/capabilities: - The embedded shellcode is msfvenom-generated (bsd/x64/exec) and executes /var/python/bin/python to run an os.system() command. - That command drops a PHP reverse-shell style script to /var/netscaler/logon/rce.php which connects back to a hardcoded attacker IP/port (192.168.232.128:4444) and spawns an interactive shell using /var/netscaler/logon/sh -i. - It also copies /bin/sh to /var/netscaler/logon/sh and sets the SUID bit (chmod +s), providing persistence/privileged shell access. Notable implementation details: - The script URL-encodes shellcode bytes below 0xA0 to fit into the HTTP request. - It relies on external tooling (ncat) rather than Python sockets for delivery. - The hardcoded gadget address suggests the exploit may be build/firmware dependent and may require adjustment for different target versions/builds. Overall purpose: - Operational RCE exploit for CVE-2023-3519 (Citrix NetScaler ADC/Gateway), delivering a reverse shell/persistence payload via a stack overflow triggered through an HTTPS request.

dhammergDisclosed Oct 27, 2023pythonmarkdownnetwork (remote) - HTTPS request triggering stack-based buffer overflow in Citrix Gateway/ADC endpoint
cve-2023-3519MaturityPoCVerified exploit

This repository contains a single Python script (poc.py) that exploits CVE-2023-3519, a remote code execution vulnerability in Citrix ADC/Gateway appliances. The script allows an attacker to execute arbitrary shell commands on a vulnerable Citrix device by sending a specially crafted HTTPS request to the /gwtest/formssso endpoint. The exploit first fingerprints the target by requesting /logon/LogonPoint/init.js to extract the Last-Modified header, which is used to determine the target's version and select the appropriate payload offsets. The attacker can specify a single target IP or a file containing multiple targets, as well as the command to execute. The result of the command can be written to a file on the target (e.g., /var/netscaler/logon/b.txt). The script uses multi-threading for scanning multiple targets and disables SSL verification for requests. The exploit is operational and requires the attacker to provide the command to execute, making it flexible but not fully weaponized. No hardcoded C2 or callback infrastructure is present; the exploit is a direct RCE tool for Citrix ADC/Gateway appliances.

rwinceyDisclosed Aug 6, 2023pythonnetwork
CVE-2023-3519MaturityPoCVerified exploit

This repository contains a working exploit for CVE-2023-3519, a remote code execution vulnerability in Citrix ADC (NetScaler) appliances (specifically version 13.1-48.47, but adaptable to others). The main exploit script (cve-2023-3519.py) crafts and sends a malicious HTTPS request to the target's /gwtest/formssso endpoint, exploiting a buffer overflow to execute custom shellcode. The shellcode, generated via mkshellcode.py (using NASM), downloads and executes a shell script payload from an attacker-controlled HTTP(S) server. Upon successful exploitation, the shellcode creates a persistent PHP backdoor at /var/netscaler/logon/a.php and sets the SUID bit on /bin/sh for privilege escalation. The included 'sh' script demonstrates a payload that runs 'id' and 'uname -a', then cleans up the backdoor and resets permissions. The exploit requires knowledge of certain memory offsets, which are hardcoded for the tested version but can be adapted for others. The repository is structured with clear separation between the exploit logic, shellcode generation, and example payloads, and is intended for offensive security research and red teaming.

BishopFoxDisclosed Jul 21, 2023pythonassemblynetwork
CVE-2023-3519MaturityPoCVerified exploit

This repository provides a fully functional exploit for CVE-2023-3519, a critical remote code execution vulnerability in Citrix ADC (NetScaler) appliances (notably version 13.1-48.47, FreeBSD-based). The repository contains two main exploit scripts (exploit.py and exploit2.py), a shellcode generator (mkshellcode.py), a custom OpenSSL configuration, and a requirements.txt for dependencies. The exploit works by sending a specially crafted payload to the vulnerable Citrix ADC endpoint (/gwtest/formssso?event=start&target=...), exploiting the vulnerability to execute arbitrary code. The payload is custom shellcode (generated via mkshellcode.py) that writes a PHP webshell to the target system (either /var/netscaler/logon/a.php, /var/netscaler/logon/b.php, or /vpn/theme/x.php) and sets the SUID bit on /bin/sh for privilege escalation. The webshell allows the attacker to execute arbitrary commands remotely via HTTP requests. The exploit scripts support both single-target and mass-scanning modes, with multithreading for efficiency. They also feature automatic callback URL generation using the fars.ee short-link service, which is used to deliver or retrieve command output. The README provides detailed usage instructions, prerequisites (including NASM for shellcode assembly), and notes on adapting the exploit for other Citrix/FreeBSD versions. Overall, this repository is a mature, operational exploit with real-world impact, capable of granting remote code execution and root shell access on vulnerable Citrix ADC appliances.

ChocapikkDisclosed Aug 24, 2023pythonassemblynetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Citrix SystemsNetscaler Application Delivery Controllerapplication
Citrix SystemsNetscaler Gatewayapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence10

Every observed campaign linking this CVE to a named adversary.

Associated malware23

Malware families riding this exploit, with evidence and IOCs.

Detection signatures2

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity8

Community discussion across Reddit, Mastodon, and other social sources.