CVE-2024-21887

Ivanti Connect Secure Authenticated Command Injection (Chained with CVE-2023-46805)

CVE-2024-21887 is a critical (CVSS 9.1) command injection vulnerability in Ivanti Connect Secure (formerly Pulse Secure) and Policy Secure web components. An authenticated administrator can send specially crafted requests to web endpoints to execute arbitrary commands on the appliance. When chained with CVE-2023-46805 (authentication bypass, CVSS 8.2), the combination allows fully unauthenticated remote code execution. The combined exploit chain was used extensively by the China-nexus threat actor UNC5221 as a zero-day, targeting defence, government, financial, and telecom organisations globally. CISA required mitigation by January 22, 2024. Ivanti Connect Secure VPN appliances are widely deployed by SMBs and enterprises as remote access infrastructure, making this a high-priority detection target.

Microsoft Sentinel / Defender
kusto
// CVE-2024-21887 — Ivanti Connect Secure Command Injection
// Detect suspicious web requests to Ivanti ICS endpoints that could indicate exploitation
// Key signals: anomalous URI patterns in ICS proxy/access logs, post-exploitation C2 traffic
let IvantiSuspiciousRequests =
W3CIISLog
| where TimeGenerated > ago(24h)
| where csHost has_any ("ivanti", "pulse", "pulsesecure", "connectsecure")
    or csUriStem has_any ("/dana-na/", "/dana/", "/api/v1/auth", "/api/v1/totp")
| where csUriStem has_any (
    "/../", "cmd", "exec", "shell", "wget", "curl", "/tmp",
    "base64", "python", "||", "&&"
  )
| extend ThreatIndicator = "CVE-2024-21887-Suspicious-ICS-Request";
let IvantiAnomalousAuth =
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where DeviceVendor has_any ("Ivanti", "Pulse Secure", "PulseSecure")
| where Activity has_any ("login", "auth", "session", "system", "exec")
| where Message has_any (
    "command", "inject", "exec", "shell", "root", "/tmp", "wget", "curl"
  )
| extend ThreatIndicator = "CVE-2024-21887-ICS-CommandInjection";
let PostExploitLateralMovement =
DeviceNetworkEvents
| where TimeGenerated > ago(24h)
| where RemotePort in (445, 3389, 22, 5985, 5986) // SMB, RDP, SSH, WinRM
| where RemoteIPType == "Private" // Post-exploit lateral movement to internal hosts
| summarize Connections=count(), Targets=make_set(RemoteIP)
  by DeviceName, InitiatingProcessAccountName, bin(TimeGenerated, 1h)
| where Connections > 10 and array_length(Targets) > 5
| extend ThreatIndicator = "CVE-2024-21887-Post-Exploit-Lateral";
IvantiSuspiciousRequests
| union IvantiAnomalousAuth
| union PostExploitLateralMovement
| sort by TimeGenerated desc
critical severity medium confidence

Data Sources

CommonSecurityLog (Ivanti Connect Secure syslog integration) W3CIISLog (if ICS web logs are forwarded) Microsoft Defender for Endpoint (DeviceNetworkEvents for post-exploitation) Azure Network Analytics

Required Tables

CommonSecurityLog W3CIISLog

False Positives

  • Legitimate ICS administrative operations logged with system-level context
  • Authorised security scanning of Ivanti appliances generating anomalous-looking web requests
  • Internal monitoring systems polling ICS API endpoints

Unlock Pro Content

Get the full detection package for CVE-2024-21887 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections