← Articles
OpenClaw Security February 20, 2026

OpenClaw iOS TLS Hardening: Forcing Encryption for Remote Gateways

A new fix ensures OpenClaw's iOS app always uses TLS when connecting to non-loopback gateway addresses — closing a gap where manual configuration could inadvertently allow unencrypted connections to remote servers.

About the Author

Mariano is a mobile security contributor to the OpenClaw project, focusing on iOS and watchOS implementations. This fix is part of a broader effort to harden OpenClaw's mobile apps for enterprise deployment.

The Vulnerability

OpenClaw allows users to manually configure gateway hosts for advanced setups — self-hosted gateways, custom deployments, or enterprise installations. The iOS app accepted these configurations without validating that remote connections used TLS.

This meant a user could accidentally (or be tricked into) configuring an HTTP connection to a remote gateway, sending authentication tokens and conversation data in plaintext across the network.

Threat model: On public WiFi or compromised networks, an attacker could intercept gateway traffic, capture auth tokens, and hijack AI assistant sessions. Given that AI assistants often handle sensitive queries (calendars, emails, documents), this exposure matters.

The Fix

Commit 8fa46d7 implements a straightforward rule:

// Simplified logic
if (!isLoopbackAddress(gatewayHost)) {
    requireTLS = true;
    if (scheme != "https") {
        scheme = "https";  // Force upgrade
    }
}

Why This Approach

The fix is intentionally simple:

  1. No exceptions: You can't configure your way around it. If it's not localhost, it's encrypted.
  2. Auto-upgrade: Rather than error out, the app fixes the scheme automatically — reducing user friction
  3. Localhost allowed: Local development and self-hosted gateways on the same device still work without certificates

Broader Context

This fix comes amid a week of security hardening in OpenClaw:

The pattern is clear: as OpenClaw matures beyond hobbyist use into enterprise and professional contexts, security gaps that were acceptable in early releases become blockers. This TLS fix is a good example — technically optional when everyone runs localhost, but essential when remote gateways enter the picture.

For Users

If you're running OpenClaw with a custom gateway configuration:

Source: openclaw/openclaw@8fa46d7