Cloudanix VulnDB

CVE-2023-3519

Critical · 9.8 CISA KEV · ransomware

CVSS

9.8

EPSS

99.7%

Published

Jul 19, 2023

CISA due date

Aug 9, 2023

Cloudanix analysis

Act now SSVC: Act

Attackers can break into vulnerable Citrix remote-access appliances from the internet without a password and use them as a doorway into the organization.

Active In The Wild
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Network Service
Class
RCE
Remediation
Upgrade
Effort
Medium
Patch risk
Medium

What it actually does

CVE-2023-3519 is a critical unauthenticated remote code execution vulnerability in Citrix NetScaler ADC and NetScaler Gateway when the appliance is configured as a Gateway or AAA virtual server. Because it is network-exploitable, low-complexity, and requires no credentials or user interaction, an attacker can send crafted requests to an exposed appliance and cause code to execute in the appliance context. Successful exploitation can allow command execution, web shell deployment, persistence, credential/session theft, configuration access, lateral movement support, and appliance disruption.

Why it matters to the business

Internet-facing NetScaler ADC and Gateway appliances are high-value edge systems that often protect VPN, remote access, authentication, and application delivery paths. Compromise can expose employee remote-access traffic, authentication material, internal application routes, and sensitive configuration data, while also giving attackers a foothold inside the network perimeter. This vulnerability is listed in CISA KEV, was assigned a remediation deadline of 2023-08-09, has extremely high EPSS likelihood, and has been used in ransomware-related activity, so unpatched systems should be treated as high-priority incident-response targets rather than routine patching tasks.

How an attack unfolds

An attacker identifies an internet-exposed NetScaler ADC or NetScaler Gateway configured for Gateway or AAA functionality, then sends a crafted unauthenticated request to trigger the code injection flaw. If successful, the appliance executes attacker-controlled commands. Attackers commonly use that access to write a web shell or other payload to the appliance filesystem, run reconnaissance commands, collect configuration and authentication data, establish persistence through scheduled tasks or modified files, and use the trusted edge device as a staging point for internal discovery and lateral movement. In observed in-the-wild exploitation, attackers have targeted vulnerable appliances at scale, including activity associated with ransomware operations, making post-patch compromise assessment essential.

How to fix it

Upgrade affected appliances to a fixed Citrix/NetScaler build immediately. Fixed branches published for this vulnerability include NetScaler ADC and NetScaler Gateway 13.1-49.13 or later, 13.0-91.13 or later, NetScaler ADC 13.1-FIPS 13.1-37.159 or later, NetScaler ADC 12.1-FIPS 12.1-55.297 or later, and NetScaler ADC 12.1-NDcPP 12.1-55.297 or later. Unsupported 12.1 non-FIPS appliances should be upgraded to a supported fixed release rather than left in place. If immediate upgrade is not possible, restrict external access to the appliance management and Gateway interfaces, limit source IPs where feasible, place compensating controls in front of exposed services, and disable unnecessary Gateway or AAA exposure; however, mitigation should not be considered equivalent to patching. If exploitation is suspected, preserve evidence, isolate the appliance, rotate credentials and secrets that may have traversed or been stored on it, and rebuild or reimage from trusted media after collecting forensic artifacts.

How to confirm the fix worked

Confirm the running NetScaler ADC/Gateway version and build using the appliance CLI or administrative interface and verify it is at or above the fixed release for the installed branch. Confirm whether the appliance is configured as a Gateway virtual server, VPN virtual server, ICA Proxy, CVPN, RDP Proxy, or AAA virtual server, because those configurations are the relevant exposed attack surface. Validate that no end-of-life affected release remains in service. Perform an external exposure check to verify only intended interfaces and virtual servers are reachable from the internet. After upgrade, review filesystem integrity, unexpected PHP or script files, modified startup or scheduled-task locations, unusual local users, unexpected outbound connections, and recent command execution artifacts to ensure the appliance was not already compromised before patching.

Typical attack path

  1. Scan the internet for exposed Citrix NetScaler ADC or NetScaler Gateway services.
  2. Fingerprint appliance versions and determine whether Gateway or AAA virtual server functionality is present.
  3. Send a crafted unauthenticated request that triggers remote code execution.
  4. Execute operating-system commands in the appliance context.
  5. Deploy a web shell or secondary payload on the appliance filesystem.
  6. Collect appliance configuration, session data, credentials, or network information.
  7. Use the appliance as a foothold for persistence, internal reconnaissance, lateral movement, or ransomware preparation.
  8. Clean up or blend activity into normal appliance traffic to delay detection.

How to detect it

Review NetScaler appliance logs and filesystem artifacts for signs of exploitation that occurred before patching. Prioritize /var/log/ns.log, /var/log/httpaccess.log, /var/log/httperror.log, /var/log/messages, shell history, cron configuration, appliance configuration backups, and any centralized syslog copies. Look for unauthenticated requests to Gateway or AAA endpoints followed by crashes, abnormal HTTP 500 responses, unexpected file writes, or child processes launching shell utilities. On the filesystem, search for recently created or modified PHP, shell, Perl, or Python files in web-accessible directories, especially under VPN themes, portal, or GUI paths. Check for persistence in cron, startup scripts, modified rc files, unauthorized local accounts, suspicious SSH keys, and unusual outbound connections from the appliance to unfamiliar IP addresses. Process and command artifacts of concern include web server or appliance processes spawning sh, bash, curl, wget, chmod, python, perl, tar, base64, or openssl. Because exploitation has been widespread and linked to ransomware activity, also hunt internally for follow-on activity sourced from the appliance IP address, including port scanning, SMB/RDP/SSH authentication attempts, credential use anomalies, and data staging.

  • /var/vpn/theme/*.php
  • /var/vpn/theme/*/*.php
  • /netscaler/ns_gui/*.php
  • /netscaler/ns_gui/vpn/*.php
  • /var/log/ns.log
  • /var/log/httpaccess.log
  • /var/log/httperror.log
  • /var/log/messages
  • /etc/crontab
  • /var/spool/cron
  • /flash/nsconfig/rc.netscaler
  • /flash/nsconfig/ns.conf
  • /flash/nsconfig/ssh/authorized_keys
  • /root/.ssh/authorized_keys
  • /var/tmp/*.sh
  • /tmp/*.sh
  • /tmp/*.php
  • /var/tmp/*.php
  • sh -c
  • /bin/bash
  • /bin/sh
  • curl http
  • wget http
  • chmod +x
  • base64 -d
  • POST /vpn/
  • POST /logon/
  • POST /cgi/

What your security team should do

  • Treat any internet-exposed, unpatched NetScaler ADC or Gateway as potentially compromised due to KEV status, active exploitation, ransomware association, and very high EPSS probability.
  • Patch or upgrade all affected appliances to a fixed supported release immediately; remove or replace unsupported 12.1 non-FIPS deployments.
  • Perform compromise assessment before and after patching, focusing on web shells, persistence, command execution, credential access, and outbound attacker infrastructure connections.
  • If compromise is suspected, isolate the appliance, preserve forensic evidence, rotate administrative credentials and secrets, invalidate active sessions where practical, and rebuild from trusted media.
  • Restrict internet exposure to only required Gateway services and enforce source allowlisting, MFA, administrative network segmentation, and centralized logging.
  • Hunt across downstream systems for activity originating from the appliance, including internal scanning, authentication anomalies, remote execution, and data staging.
  • Monitor vendor advisories and threat-intelligence reporting for updated indicators, tooling, and post-exploitation tradecraft associated with this vulnerability.

The record

Unauthenticated remote code execution

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities