Skip to main content
Mallory
CriticalExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2019-19781: Unauthenticated Path Traversal RCE in Citrix ADC and Gateway

Published Dec 27, 2019 · Updated today
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days4 mentions · peak 2 in a dayToday
CVSS9.8Critical · v3.1
EPSS100.0%100th percentile
CISA KEVYesAdded Nov 3, 2021
In the wildActivePer CISA KEV
Vendor
Citrix Systems
IdentifiersCVE-2019-19781CWE-22 · Improper Limitation of a Pathname…
Also known ascitrix_netscaler_cve_2019_19781

CVE-2019-19781 is a directory traversal vulnerability affecting Citrix Application Delivery Controller and Citrix Gateway, formerly NetScaler, in the 10.5, 11.1, 12.0, 12.1, and 13.0 release branches, and certain Citrix SD-WAN WANOP appliances. Unauthenticated remote attackers can exploit crafted requests to achieve arbitrary code execution on vulnerable appliances. Observed exploitation executed code as the nobody user and enabled web-shell deployment and persistent access; root privileges are not an inherent outcome of this vulnerability.

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 appliance's confidentiality and integrity through arbitrary code execution, malware installation, persistence, and potential data exfiltration. Incident investigations identified cron-based persistence, web shells, scripts, and attempts to steal appliance configurations containing encrypted passwords and password hashes. Recoverable credentials can enable further network compromise, particularly where privileged directory accounts are configured. Exploitation has also supported cryptocurrency mining and ransomware campaigns.

Mitigation

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

Apply the vendor's CVE-2019-19781 mitigation procedure in CTX267679 and validate its effectiveness with the vendor's verification tool. Certain early ADC 12.1 builds require an upgrade before that mitigation is effective. Disconnect unpatched or unmitigated appliances from the Internet pending remediation. Limit appliance exposure, isolate externally facing services from internal networks, and restrict back-end connectivity and service-account privileges. Use compromise scanners and artifact checks as starting points for investigation, not as proof that an appliance is clean.

Remediation

Patch, then assume compromise.

Upgrade to a supported release containing the fix. Historical fixed ADC/Gateway builds are 13.0-47.24, 12.1-55.18, 12.0-63.13, 11.1-63.15, and 10.5-70.12; fixed SD-WAN WANOP releases include 10.2.6b and 11.0.3b. Appliances exposed while unpatched and unmitigated should be treated as potentially compromised and undergo a full forensic investigation. Remove established persistence and rotate potentially exposed appliance and back-end credentials. Applying a patch does not remove an existing compromise.

Public exploits

Exploits

8 exploits validated by Mallory's analysis. Hidden: 13 rejected by Mallory's analysis as not a working exploit; 4 not yet analyzed, such as Exploit-DB entries.

View more in app →
citrix_dir_traversal_rce.rbThis repository contains a single Metasploit module targeting Citrix ADC (NetScaler) and Gateway appliances vulnerable to CVE-2019-19781, a critical directory traversal and remote code execution flaw. The exploit abuses a directory traversal vulnerability in the web interface to write a malicious template file, which is then executed to run arbitrary commands or spawn a reverse shell on the target system. The module supports both Python and Unix command payloads, allowing for flexible post-exploitation. The main attack vector is network-based, requiring HTTP(S) access to the vulnerable device. The code is mature, weaponized, and part of the Metasploit framework, making it easy to use and customize. The module references several public advisories and PoCs, and is structured with clear separation of payload generation, exploitation logic, and cleanup routines. Key endpoints include the vulnerable 'newbm.pl' script and the template files created on the target system.Disclosed Dec 17, 2019 · Framework: metasploit · ruby · networkWeaponizedCVE-2019-19781This 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.projectzeroindia · Disclosed Jan 10, 2020 · bash · networkOperationalcve-2019-19781This 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.trustedsec · Disclosed Jan 11, 2020 · python · networkOperationalCVE-2019-19781This 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.jas502n · Disclosed Jan 11, 2020 · python · networkOperationalCVE-2019-19781This 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.mpgn · Disclosed Jan 11, 2020 · python · networkOperationalExploits_CVE-2019-19781This 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.unknowndevice64 · Disclosed Jan 11, 2020 · bash · networkOperationalShitrix-CVE-2019-19781This 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.jamesjguthrie · Disclosed Jan 12, 2020 · shell · python · networkOperationalabyss-c2This 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-alt · Disclosed May 20, 2026 · python · html · network · web · localOperational
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
FAQ

Frequently asked questions

Is CVE-2019-19781 exploited in the wild?
Yes. As of Nov 28, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Nov 3, 2021.
Is there a public exploit for CVE-2019-19781?
Yes. Mallory tracks 8 public exploits or proofs of concept for CVE-2019-19781, the earliest disclosed Dec 17, 2019.
Is there a patch for CVE-2019-19781?
Upgrade to a supported release containing the fix. Historical fixed ADC/Gateway builds are 13.0-47.24, 12.1-55.18, 12.0-63.13, 11.1-63.15, and 10.5-70.12; fixed SD-WAN WANOP releases include 10.2.6b and 11.0.3b.
What products are affected by CVE-2019-19781?
Citrix Systems Application Delivery Controller Firmware, Citrix Systems Gateway Firmware, and Citrix Systems Netscaler Gateway Firmware.
How severe is CVE-2019-19781?
CVE-2019-19781 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 100.0% (100th percentile) as of Nov 28, 2026.
Activity feed

Recent activity

136 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
+91 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
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 evidence51Every report linking this CVE to a named adversary.
Associated malware43Malware families linked to this CVE, with evidence and IOCs.
Detection signatures8YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity3Community discussion across Reddit, Mastodon, and other social sources.