GHSA-28f5-38xr-jh2w
HIGHGHSA-28f5-38xr-jh2w is a high-severity (CVSS 8.2) CWE-441 vulnerability in io.appium:java-client. O3 Security confirms whether GHSA-28f5-38xr-jh2w is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
java-client Allows Network Pivot via Unvalidated directConnect Redirect in AppiumCommandExecutor
Blast Radius
io.appium:java-clientReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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:
<img width="887" height="146" alt="1" src="https://github.com/user-attachments/assets/cc28002c-ea20-4ac8-8336-cec632e3c842" />Screenshot 2 — Java client processing response from attacker host:
<img width="788" height="130" alt="2" src="https://github.com/user-attachments/assets/222cbab0-0d53-45b2-847d-6aa4e3b79370" />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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | io.appium:java-client | ≥ 8.2.1&&< 10.1.1 | 10.1.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for io.appium:java-client. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update io.appium:java-client to 10.1.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-28f5-38xr-jh2w is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-28f5-38xr-jh2w is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-28f5-38xr-jh2w. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-28f5-38xr-jh2w in your dependencies?
O3 detects GHSA-28f5-38xr-jh2w across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.