Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2023-3519: Unauthenticated Remote Code Execution in Citrix NetScaler ADC and Gateway

Published Jul 19, 2023 · Updated 13 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS9.8Critical · v3.1
EPSS99.7%100th percentile
CISA KEVYesAdded Jul 19, 2023
In the wildActivePer CISA KEV
Vendor
Citrix Systems
IdentifiersCVE-2023-3519CWE-121

CVE-2023-3519 is an unauthenticated remote code execution vulnerability affecting Citrix NetScaler Application Delivery Controller (ADC) and NetScaler Gateway. Remote attackers can execute arbitrary code on vulnerable appliances. Exploited as a zero-day in June 2023, the vulnerability has been used to install web shells that support persistent access, Active Directory discovery, data collection, exfiltration, and attempted lateral movement. Security updates were released in July 2023. This vulnerability is distinct from CitrixBleed, CVE-2023-4966.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation compromises the affected appliance and can establish a foothold into connected internal networks. Observed exploitation enabled web-shell persistence, discovery of Active Directory environments, and collection and exfiltration of directory data. Further compromise depends on internal reachability and available credentials; network segmentation blocked attempted lateral movement to a domain controller in one documented incident. Ransomware affiliates have also exploited the vulnerability for initial access.

Mitigation

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

No alternative workaround that eliminates the vulnerability is identified. Restrict appliance exposure to authorized sources where feasible and segment appliances from domain controllers and other sensitive internal systems to limit post-exploitation movement. Enable appliance logging, forward logs to a separate repository, and investigate unexpected processes, web shells, configuration changes, and unusual internal connections originating from appliances. These controls supplement, but do not replace, patching.

Remediation

Patch, then assume compromise.

Apply the appropriate Citrix firmware updates immediately. Identified fixed builds include 13.1-49.13 or later, 13.0-91.13 or later, 13.1-37.159 or later for 13.1-FIPS, and 12.1-55.297 or later for 12.1-FIPS and 12.1-NDcPP. Migrate unsupported standard 12.1 installations to a supported release. Investigate both patched and unpatched appliances for prior compromise: updating firmware does not remove previously installed web shells or other persistence. Remove identified persistence and replace compromised appliances where necessary.

Public exploits

Exploits

5 exploits validated by Mallory's analysis. Hidden: 4 rejected by Mallory's analysis as not a working exploit.

View more in app →
citrix_formssso_target_rce.rbThis repository contains a single Metasploit module targeting CVE-2023-3519, a critical unauthenticated remote code execution vulnerability in Citrix ADC (NetScaler) appliances. The exploit leverages a stack buffer overflow in the nsppe process, triggered by a specially crafted HTTP GET request to the '/gwtest/formssso' endpoint. The module supports multiple Citrix ADC versions (13.1-48.47, 13.1-37.38, 13.0-91.12, 12.1-65.25, 12.1-64.17) and includes logic for automatic version detection using various endpoints (such as '/logon/LogonPoint/index.html', '/vpn/index.html', and '/logon/fonts/citrix-fonts.css'). Upon successful exploitation, arbitrary commands are executed as root on the target device. The payload is customizable via Metasploit, and the exploit is operational, providing real remote code execution capabilities. The code is written in Ruby and is structured as a standard Metasploit exploit module, making it easy to use within the Metasploit framework.Disclosed Jul 18, 2023 · Framework: metasploit · ruby · networkWeaponizedCVE-2023-3519This 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.BishopFox · Disclosed Jul 21, 2023 · python · assembly · networkOperationalcve-2023-3519This 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.rwincey · Disclosed Aug 6, 2023 · python · networkOperationalCVE-2023-3519This 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.Chocapikk · Disclosed Aug 24, 2023 · python · assembly · networkOperationalCVE-2023-3519Repository 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.dhammerg · Disclosed Oct 27, 2023 · python · markdown · network (remote) - HTTPS request triggering stack-based buffer overflow in Citrix Gateway/ADC endpointOperational
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 Adcapplication
Citrix SystemsNetscaler Gatewayapplication
FAQ

Frequently asked questions

Is CVE-2023-3519 exploited in the wild?
Yes. As of Nov 4, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Jul 19, 2023.
Is there a public exploit for CVE-2023-3519?
Yes. Mallory tracks 5 public exploits or proofs of concept for CVE-2023-3519, the earliest disclosed Jul 18, 2023.
Is there a patch for CVE-2023-3519?
Apply the appropriate Citrix firmware updates immediately. Identified fixed builds include 13.1-49.13 or later, 13.0-91.13 or later, 13.1-37.159 or later for 13.1-FIPS, and 12.1-55.297 or later for 12.1-FIPS and 12.1-NDcPP.
What products are affected by CVE-2023-3519?
Citrix Systems Netscaler Adc and Citrix Systems Netscaler Gateway.
How severe is CVE-2023-3519?
CVE-2023-3519 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 99.7% (100th percentile) as of Nov 4, 2026.
Mallory platform

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, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidence18Every report linking this CVE to a named adversary.
Associated malware35Malware families linked to this CVE, with evidence and IOCs.
Detection signatures4YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity12Community discussion across Reddit, Mastodon, and other social sources.