Summary
java-client Allows Network Pivot via Unvalidated directConnect Redirect in AppiumCommandExecutor
Advisory details
Summary
When directConnect(true) is enabled, appium/java-client unconditionally
accepts directConnectHost, directConnectPort, and directConnectPath
from the server's NEW_SESSION response and silently redirects all subsequent
session traffic to the attacker-specified endpoint — with no allowlist,
no host validation, and no user notification.
Affected Code
AppiumCommandExecutor.java(line 196–219):setDirectConnect()builds a new URL from server-supplied fields and callsoverrideServerUrl(newUrl)without validating host/IP.DirectConnect.java:getUrl()constructsprotocol://host:port/pathwith no allowlist.
Root Cause
Only the protocol is validated (must equal "https"). The destination host and port are never checked against any allowlist or denylist.
PoC (confirmed)
A rogue server injecting directConnectHost=127.0.0.1:4443 causes the
client to silently redirect all post-session commands:
[bootstrap] POST /wd/hub/session [bootstrap] Injecting directConnect -> https://127.0.0.1:4443/wd/hub [redirect-target] HIT #1: GET /wd/hub/session/poc-session-001/source [redirect-target] HIT #2: DELETE /wd/hub/session/poc-session-001
Original source code unmodified — confirmed via git diff HEAD (empty).
Evidence Screenshots
Screenshot 1 — Rogue server capturing redirected traffic:
Screenshot 2 — Java client processing response from attacker host:
Impact
- Full interception of session traffic
- Network pivot to internal hosts (RFC-1918, 169.254.169.254)
- Cloud credential theft via IMDS endpoint
- Escalates to ~8.1 High in CI/CD environments where directConnect(true) is set in shared base configuration
Suggested Fix
Add allowlist validation before overrideServerUrl() is called, and/or
block RFC-1918/loopback/link-local destinations by default.
References
- https://github.com/advisories/GHSA-28f5-38xr-jh2w
- https://github.com/appium/java-client/security/advisories/GHSA-28f5-38xr-jh2w
- https://github.com/appium/java-client/pull/2408
- https://github.com/appium/java-client/commit/2b9cd442b9dbf56ccc6f1e83aeeb411c0ec230c9
- https://github.com/appium/java-client/releases/tag/v10.1.1
Related vulnerabilities
All Supply chain →- MEDIUMCVE-2026-63643
MagicMirror: ssrf calendar .js
- MEDIUMCVE-2026-54663
swagger-typescript-api vulnerable to Server-Side Request Forgery via spec `$ref`
- HIGHCVE-2026-54628
Anyquery: Server-Side Request Forgery (SSRF) via Unrestricted SQLite Virtual Table Modules in Server Mode
- CRITICALCVE-2026-75856
CodeWhale: SSRF bypass - TOCTOU on DNS failure for DNS pinning
- CRITICALCVE-2026-71428
unstructured: Server-Side Request Forgery in the URL-based partitioning
- HIGHCVE-2026-65842
Plate: SSRF with response disclosure in DOCX image embedding