/

CVE-2026-43910

Severity:

HIGH RISK

(8.2)

Improper URL Redirection (CWE-441) in Appium Java Client

CVE-2026-43910

Analyzed

Vulnerability type

Category:

Improper Redirects and SSRF

CWE:

CWE-441, CWE-918

Impact:

Traffic Interception and Server-Side Request Forgery (SSRF)

Severity:

HIGH RISK

(8.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Appium Java Client's directConnect feature can be abused to redirect WebDriver session traffic to attacker-controlled endpoints by trusting server-provided connection parameters with minimal validation.

A rogue or compromised Appium server can rewrite the client's target URL, enabling full interception of session traffic and server-side request forgery toward internal services and metadata endpoints.

Appium Java Client's directConnect feature can be abused to redirect WebDriver session traffic to attacker-controlled endpoints by trusting server-provided connection parameters with minimal validation.

A rogue or compromised Appium server can rewrite the client's target URL, enabling full interception of session traffic and server-side request forgery toward internal services and metadata endpoints.

Affected context

The issue arises in Appium Java Client versions 8.2.1 through 10.1.1 when the directConnect(true) option is enabled in test clients.

In this mode, the client reads directConnectHost, directConnectPort, and directConnectPath from the Appium server's NEW_SESSION response and reconstructs the server URL.

Only the scheme (https) is validated; there is no built-in validation of the target host or IP, so any Appium deployment that allows untrusted or shared servers may be exposed to malicious redirection.

The issue arises in Appium Java Client versions 8.2.1 through 10.1.1 when the directConnect(true) option is enabled in test clients.

In this mode, the client reads directConnectHost, directConnectPort, and directConnectPath from the Appium server's NEW_SESSION response and reconstructs the server URL.

Only the scheme (https) is validated; there is no built-in validation of the target host or IP, so any Appium deployment that allows untrusted or shared servers may be exposed to malicious redirection.

Exploit preconditions

  • Attack surface: WebDriver/Appium client-server communication channel.
  • Required access: Ability to operate, compromise, or influence the Appium server that responds to NEW_SESSION requests.
  • Trigger point: A client using Appium Java Client (affected versions) with directConnect(true) enabled and initiating a new session.
  • Why exploitation is possible: The client automatically rebuilds its base URL from server-supplied directConnect* fields, validating only that the protocol is https and not enforcing any host, domain, or IP allowlist; this lets a malicious server redirect all subsequent requests to arbitrary endpoints.
  • Attack surface: WebDriver/Appium client-server communication channel.
  • Required access: Ability to operate, compromise, or influence the Appium server that responds to NEW_SESSION requests.
  • Trigger point: A client using Appium Java Client (affected versions) with directConnect(true) enabled and initiating a new session.
  • Why exploitation is possible: The client automatically rebuilds its base URL from server-supplied directConnect* fields, validating only that the protocol is https and not enforcing any host, domain, or IP allowlist; this lets a malicious server redirect all subsequent requests to arbitrary endpoints.

Why this happens

The bug stems from over-trusting server-provided connection metadata when reconfiguring the client's base URL.

AppiumCommandExecutor's setDirectConnect() method accepts directConnectHost, directConnectPort, and directConnectPath from the NEW_SESSION response and reconstructs the endpoint used for subsequent WebDriver commands.

This pattern maps to CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') because the client acts as a powerful proxy for the server's chosen destination, and to CWE-918: Server-Side Request Forgery (SSRF) because attacker-controlled values can steer the client to send authenticated requests to internal or sensitive network locations without validating those targets.

The bug stems from over-trusting server-provided connection metadata when reconfiguring the client's base URL.

AppiumCommandExecutor's setDirectConnect() method accepts directConnectHost, directConnectPort, and directConnectPath from the NEW_SESSION response and reconstructs the endpoint used for subsequent WebDriver commands.

This pattern maps to CWE-441: Unintended Proxy or Intermediary ('Confused Deputy') because the client acts as a powerful proxy for the server's chosen destination, and to CWE-918: Server-Side Request Forgery (SSRF) because attacker-controlled values can steer the client to send authenticated requests to internal or sensitive network locations without validating those targets.

Potential impact

  • A malicious or compromised Appium server may redirect all WebDriver session traffic to an attacker-controlled endpoint.
  • Attackers could intercept, modify, or replay session commands and responses, potentially altering automated tests or exfiltrating sensitive test data.
  • The client may be used as an unintended SSRF channel to reach internal network services not otherwise exposed.
  • Cloud metadata services (IMDS) could be accessed via redirected requests, potentially leading to credential theft and further cloud account compromise.
  • Internal APIs or admin interfaces reachable from the client's network position could be probed or abused.
  • A malicious or compromised Appium server may redirect all WebDriver session traffic to an attacker-controlled endpoint.
  • Attackers could intercept, modify, or replay session commands and responses, potentially altering automated tests or exfiltrating sensitive test data.
  • The client may be used as an unintended SSRF channel to reach internal network services not otherwise exposed.
  • Cloud metadata services (IMDS) could be accessed via redirected requests, potentially leading to credential theft and further cloud account compromise.
  • Internal APIs or admin interfaces reachable from the client's network position could be probed or abused.

General mitigation guidance

Risk reduction typically focuses on constraining where the client is willing to redirect and tightening trust boundaries around Appium servers.

Useful patterns include:

  • Enforcing a strict allowlist of acceptable hosts, domains, or IP ranges before applying any direct-connect parameters from server responses.
  • Disabling directConnect in environments where servers are shared, multi-tenant, or not under strong administrative control.
  • Treating server-supplied endpoint hints as untrusted data, requiring explicit validation against organizational policies before use.
  • Isolating test infrastructure networks and limiting their ability to reach internal services, metadata endpoints, and other high-value targets.
  • Applying least-privilege network permissions and outbound firewall rules from test runners so that even misdirected traffic has constrained reach.

Risk reduction typically focuses on constraining where the client is willing to redirect and tightening trust boundaries around Appium servers.

Useful patterns include:

  • Enforcing a strict allowlist of acceptable hosts, domains, or IP ranges before applying any direct-connect parameters from server responses.
  • Disabling directConnect in environments where servers are shared, multi-tenant, or not under strong administrative control.
  • Treating server-supplied endpoint hints as untrusted data, requiring explicit validation against organizational policies before use.
  • Isolating test infrastructure networks and limiting their ability to reach internal services, metadata endpoints, and other high-value targets.
  • Applying least-privilege network permissions and outbound firewall rules from test runners so that even misdirected traffic has constrained reach.

How teams detect issues like this

Security and QA teams can look for this pattern using:

  • Static analysis rules that flag code enabling directConnect(true) without accompanying host or URL validation logic.
  • Code review checklists that prompt reviewers to verify how Appium/WebDriver endpoints are constructed and whether server-provided URLs are trusted implicitly.
  • Centralized logging or proxying of outbound HTTP(S) traffic from test runners to identify unexpected destinations or traffic to internal-only services.
  • Configuration audits of CI/test environments to ensure that Appium servers are trusted, single-tenant where possible, and not arbitrarily managed by untrusted users.

Automated code scanning and policy-as-code tools can be configured to detect usages of insecure connection reconstruction patterns and highlight them before deployment.

Security and QA teams can look for this pattern using:

  • Static analysis rules that flag code enabling directConnect(true) without accompanying host or URL validation logic.
  • Code review checklists that prompt reviewers to verify how Appium/WebDriver endpoints are constructed and whether server-provided URLs are trusted implicitly.
  • Centralized logging or proxying of outbound HTTP(S) traffic from test runners to identify unexpected destinations or traffic to internal-only services.
  • Configuration audits of CI/test environments to ensure that Appium servers are trusted, single-tenant where possible, and not arbitrarily managed by untrusted users.

Automated code scanning and policy-as-code tools can be configured to detect usages of insecure connection reconstruction patterns and highlight them before deployment.

Sources

SourceLink
github.comgithub.com/appium/java-client/commit/2b9cd442b9dbf56ccc6f1e83aeeb411c0ec230c9
github.comgithub.com/appium/java-client/pull/2408
github.comgithub.com/appium/java-client/releases/tag/v10.1.1
github.comgithub.com/appium/java-client/security/advisories/GHSA-28f5-38xr-jh2w

Frequently asked

questions

Yes, if an attacker can control or compromise the Appium server that the client connects to. The attacker does not need direct access to the client host; they only need to influence the NEW_SESSION response.

The attacker must be able to run, configure, or interfere with the Appium server instance used by the vulnerable Java client. This commonly includes scenarios such as multi-tenant test infrastructure, shared QA servers, or a server that has been compromised.

The safest fix is to validate or constrain server-supplied connection data before rebuilding client URLs. This typically means enforcing an allowlist of hosts or domains, ignoring unexpected directConnect* values, or avoiding the automatic direct-connect behavior for untrusted servers.

Future designs should treat any endpoint or URL parameters received over the network as untrusted input, enforce strict validation and allowlists before use, and avoid letting remote components dynamically redefine high-privilege connection targets without local policy checks. Regular security reviews of connection-handling logic in client libraries can also help catch such patterns early.

Yes, if an attacker can control or compromise the Appium server that the client connects to. The attacker does not need direct access to the client host; they only need to influence the NEW_SESSION response.

The attacker must be able to run, configure, or interfere with the Appium server instance used by the vulnerable Java client. This commonly includes scenarios such as multi-tenant test infrastructure, shared QA servers, or a server that has been compromised.

The safest fix is to validate or constrain server-supplied connection data before rebuilding client URLs. This typically means enforcing an allowlist of hosts or domains, ignoring unexpected directConnect* values, or avoiding the automatic direct-connect behavior for untrusted servers.

Future designs should treat any endpoint or URL parameters received over the network as untrusted input, enforce strict validation and allowlists before use, and avoid letting remote components dynamically redefine high-privilege connection targets without local policy checks. Regular security reviews of connection-handling logic in client libraries can also help catch such patterns early.

Find out what's already
exploitable in your codebase.