Unauthenticated RCE in Citrix NetScaler ADC and Gateway
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.
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.
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.
Mitigation
If you can’t patch tonight, do this now.
Remediation
Patch, then assume compromise.
Exploits
4 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (4 hidden).
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.
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.
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.
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.
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.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
Recent activity
48 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
An unauthenticated remote code execution vulnerability affecting Citrix NetScaler ADC and Citrix Gateway.
A remote code execution vulnerability in Citrix NetScaler ADC/Gateway that the content says was used for initial access in INC ransomware activity.
A specific Citrix NetScaler vulnerability that the INC ransomware group is described as exploiting as part of its intrusion methods.
A vulnerability in Citrix NetScaler cited as one of the public-facing application flaws used by INC ransomware actors for initial access.
The version that knows your environment.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.