Skip to main content
Mallory
CriticalCISA KEVExploited in the wildPublic exploit

Directory Traversal and RCE in Citrix ADC/Gateway

IdentifiersCVE-2019-19781CWE-22· Improper Limitation of a Pathname…Also known ascitrix_netscaler_cve_2019_19781

CVE-2019-19781 is a critical unauthenticated vulnerability in Citrix Application Delivery Controller (ADC), Citrix Gateway, and certain Citrix SD-WAN WANOP appliances. The issue was publicly described as a directory traversal flaw, but the provided content further indicates exploitation can lead to arbitrary remote code execution. In the described exploit chain, an attacker sends a crafted POST request to the Perl script newbm.pl with attacker-controlled title and desc parameters, while abusing the NSC_USER header to perform directory traversal and control the path of an XML file written on the appliance. Because the application writes unsanitized attacker-controlled data into that XML file, a second request can cause the file to be parsed as a Perl Template Toolkit template, resulting in execution of injected system commands. The commands execute in the context of the webserver user nobody. Affected versions in the provided content include ADC/Gateway 10.5 before 10.5.70.12, 11.1 before 11.1.63.15, 12.0 before 12.0.63.13, 12.1 before 12.1.55.18, 13.0 before 13.0.47.24, and supported SD-WAN WANOP builds before 10.2.6b and 11.0.3b on specified models.

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 traverse directories, write attacker-controlled content to the appliance filesystem, and achieve arbitrary command execution on the vulnerable Citrix device. The content states exploitation enables unauthorized remote code execution and full system compromise of the appliance. In observed intrusions, actors used the flaw for initial access, malware deployment, web shell installation, credential theft, persistence, lateral movement, and access to internal enterprise resources exposed through the Citrix infrastructure.

Mitigation

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

If immediate patching is not possible, apply Citrix's vendor mitigation guidance referenced in CTX267679 and verify mitigation effectiveness using Citrix guidance/tooling referenced in CTX269180. However, the provided content explicitly warns that some Citrix ADC builds earlier than certain 12.1 builds contained a flaw that prevented the recommended mitigation from functioning, and that mitigation may not have prevented all exploitation methods. Therefore mitigation should be treated only as a temporary measure, vulnerable builds should be upgraded so mitigations function correctly, internet exposure should be minimized where feasible, and devices should be checked for signs of breach even after mitigations are applied.

Remediation

Patch, then assume compromise.

Apply Citrix's fixed builds for all affected products. Based on the provided content, fixed versions include ADC/Gateway 13.0-47.24 and later, 12.1-55.18 and later, 12.0-63.13 and later, 11.1-63.15 and later, 10.5-70.12 and later, and supported SD-WAN WANOP releases 10.2.6b/11.0.3b or later as applicable. The content also notes Citrix released patches in January 2020 and advised customers to install corrected software as soon as available. Because exploitation in the wild was widespread and mitigations may not have blocked all methods, organizations should also inspect appliances for compromise using Citrix/FireEye IOC tooling and perform incident response if indicators are found.
PUBLIC EXPLOITS

Exploits

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

VALID 7 / 20 TOTALView more in app
abyss-c2MaturityPoCVerified exploit

This repository is a multi-module Python offensive framework centered on exploiting HiSilicon DVR/NVR/IP camera devices via CVE-2020-25078, then managing compromised hosts through a Flask/SocketIO web panel. It is not a simple single-file PoC: it includes a control server (server.py), persistence and post-exploitation tooling, credential attacks, recon modules, web vulnerability scanners, network service checks, pivoting, reverse shell support, and a SQLite-backed datastore. Core exploit logic is in exploit.py and scanner.py. exploit.py probes numerous traversal/disclosure paths such as /../../.../mnt/mtd/Config/Account1 and related config/system files, parses returned content with multiple regex patterns to recover credentials, fingerprints device families, and falls back to known default credentials when disclosure succeeds but parsing does not. scanner.py operationalizes this by scanning IPs/CIDRs and common ports, checking liveness, fingerprinting likely cameras, invoking the CVE-2020-25078 checks, and storing recovered credentials in cameras.db. Post-exploitation capability is substantial. telnet_client.py provides raw Telnet login and command execution. botnet.py fans out commands across stored hosts. persistence.py installs SSH authorized_keys, cron, rc.local, init.d, systemd, inittab telnetd, and bind-shell style persistence. reverse_shell.py generates many Linux/IoT reverse shell one-liners and runs listeners. pivot_chain.py and socks_pivot.py support chained execution and local SOCKS5 pivoting through compromised hosts. Additional modules broaden scope beyond the HiSilicon exploit: brute.py and cred_spray.py perform credential attacks across Telnet, SSH, FTP, HTTP, SMB, databases, VNC, LDAP, WinRM, and more; network_exploit.py checks for exposed/misconfigured services and some well-known vulnerabilities such as MS17-010 and BlueKeep; web_exploit.py, web_cves.py, web_bugs.py, and web_brute.py scan websites for exposed files, CMS fingerprints, generic bug classes, and multiple CVE signatures. Recon/intel support includes ASN, DNS, GeoIP, JARM, WAF detection, proxy/Tor rotation, screenshot grabbing from camera snapshot endpoints, and Telegram/Discord/AbuseIPDB integrations. The repository structure is coherent and functional, with many CLI-capable modules and a central web UI in templates/index.html. Overall, this is an operational exploit-and-post-exploitation toolkit focused on HiSilicon IoT devices but expanded into a broader C2-style offensive platform.

flags-altDisclosed May 20, 2026pythonhtmlnetworkweblocal
Exploits_CVE-2019-19781MaturityPoCVerified exploit

This repository contains a Bash script exploit for CVE-2019-19781, a critical remote code execution vulnerability affecting Citrix Application Delivery Controller and Citrix Gateway devices. The exploit works by sending a crafted HTTP POST request to the vulnerable endpoint '/vpn/../vpns/portal/scripts/newbm.pl' on the target device, injecting a malicious template that executes an arbitrary shell command provided by the user. The output of the command is written to a file in '/netscaler/portal/templates/' and then retrieved via a subsequent HTTP GET request. The script takes two arguments: the IP address of the vulnerable Citrix device and the command to execute. The repository also includes a README with usage instructions and references. The exploit is operational and allows attackers to execute arbitrary commands on vulnerable Citrix devices over the network.

unknowndevice64Disclosed Jan 11, 2020bashnetwork
CVE-2019-19781MaturityPoCVerified exploit

This repository contains a Python exploit script (CVE-2019-19781.py) and a detailed README for CVE-2019-19781, a critical remote code execution vulnerability in Citrix ADC (NetScaler) and Citrix Gateway appliances. The exploit script allows an unauthenticated attacker to execute arbitrary system commands on a vulnerable Citrix device by abusing a directory traversal and template injection flaw. The script works interactively: it prompts the user for commands, crafts a malicious POST request to the /vpn/../vpns/portal/scripts/newbm.pl endpoint to create a template containing the command, and then retrieves the output via a GET request to /vpns/portal/<random>.xml. The README provides background, affected product versions, detection tips, and references. The exploit is operational and demonstrates real-world impact, but is not part of a larger framework. No hardcoded IPs or domains are present; the target URL is supplied by the user at runtime.

mpgnDisclosed Jan 11, 2020pythonnetwork
CVE-2019-19781MaturityPoCVerified exploit

This repository contains a working exploit for CVE-2019-19781, a critical remote code execution vulnerability in Citrix Application Delivery Controller (ADC) and Citrix Gateway appliances. The exploit is implemented in a single Python script (CVE-2019-19781.py) and is accompanied by a detailed README.md with usage instructions and background information. The exploit works by abusing a directory traversal and template injection vulnerability. It uploads a malicious XML template to the target device via the '/vpn/../vpns/portal/scripts/newbm.pl' endpoint, using crafted HTTP headers and POST data. The template contains a payload that executes arbitrary system commands. The attacker then accesses the uploaded template via '/vpn/../vpns/portal/{cdl}.xml' to trigger command execution and retrieve the output. The script is interactive, allowing the user to specify commands to execute on the target. The README provides example requests, expected responses, and screenshots, as well as references for further reading. The exploit targets unpatched Citrix ADC and Gateway devices and requires network access to the device's web interface. No authentication is required for exploitation. Overall, this repository provides a fully operational exploit for remote code execution on vulnerable Citrix appliances, with clear instructions and a functional payload.

jas502nDisclosed Jan 11, 2020pythonnetwork
Shitrix-CVE-2019-19781MaturityPoCVerified exploit

This repository contains a shell script exploit (shitrix.sh) for CVE-2019-19781, a critical path traversal and template injection vulnerability in Citrix ADC (NetScaler) appliances. The exploit works by sending crafted HTTP requests to the target device, exploiting the vulnerability to write a malicious template file and then execute arbitrary shell commands provided by the user. The script uses Python to generate random filenames and nonces, base64-encodes the user-supplied command, and injects it into the template. The README provides usage instructions, indicating that the script requires curl >= 7.42.0 and is invoked with the target, port, and command to execute. The exploit is operational, allowing for arbitrary command execution on vulnerable Citrix appliances. The main fingerprintable endpoints are the crafted HTTP paths used in the exploit, and the file path targeted for template injection. The repository is concise, containing only the exploit script and a README.

jamesjguthrieDisclosed Jan 12, 2020shellpythonnetwork
cve-2019-19781MaturityPoCVerified exploit

This repository provides two main Python scripts: 'citrixmash.py' and 'cve-2019-19781_scanner.py'. 'citrixmash.py' is a full exploit for CVE-2019-19781, a critical directory traversal vulnerability in Citrix ADC (NetScaler) devices. The exploit works in two stages: first, it uses a crafted POST request to the '/vpn/../vpns/portal/scripts/newbm.pl' endpoint to write a malicious XML template file to the target system. This template contains a payload that, when triggered, executes a Python-based reverse shell, connecting back to the attacker's listener. The second stage triggers the execution of this template, resulting in remote code execution on the Citrix device. The exploit leaves artifacts in '/var/tmp/netscaler/portal/templates/' and '/netscaler/portal/templates/'. 'cve-2019-19781_scanner.py' is a scanner script that checks if a target is still vulnerable to CVE-2019-19781 by attempting to access the 'smb.conf' file via a traversal path. It supports scanning single IPs, CIDR ranges, hostnames, and ASN lookups, and can import targets from a file. The scanner reports if the target is vulnerable or patched. The repository also includes a 'requirements.txt' for dependencies and a 'README.md' with detailed usage instructions and background information. The exploit is operational, providing a working reverse shell payload, and is intended for use against unpatched Citrix ADC (NetScaler) devices vulnerable to CVE-2019-19781.

trustedsecDisclosed Jan 11, 2020pythonnetwork
CVE-2019-19781MaturityPoCVerified exploit

This repository contains a Bash script exploit (CVE-2019-19781.sh) targeting Citrix Application Delivery Controller and Citrix Gateway devices vulnerable to CVE-2019-19781, a critical remote code execution vulnerability. The exploit works by sending a crafted HTTP POST request to the target's '/vpn/../vpns/portal/scripts/newbm.pl' endpoint, injecting a malicious template that executes an arbitrary command provided by the user. The output of the command is written to a file on the target device ('/netscaler/portal/templates/<FILENAME>.xml'), which is then retrieved via a subsequent HTTP GET request. The script is operational and allows attackers to execute arbitrary shell commands on vulnerable Citrix devices. The repository includes a README with usage instructions and references to official advisories. No detection or fake code is present; the exploit is functional and straightforward, requiring only the target's IP and a command to execute.

projectzeroindiaDisclosed Jan 10, 2020bashnetwork
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 SystemsApplication Delivery Controller Firmwareoperating_system
Citrix SystemsGateway Firmwareoperating_system
Citrix SystemsNetscaler Gateway Firmwareoperating_system

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 evidence23

Every observed campaign linking this CVE to a named adversary.

Associated malware14

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 activity2

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