Ferritaas Incident Intelligence
Defect Intelligence Report Bug 0864902 Severity: Medium (P3)

Guest Captive Portal HTTPS Redirection Loop on Apple iOS / Android CNA

Intercepting initial HTTPS probe traffic with a wildcard certificate (*.domain.com) causes Apple iOS Captive Network Assistant (CNA) and Android CaptivePortalLogin to trigger TLS mismatch security alerts, aborting the modal sign-in sheet and trapping guest Wi-Fi users in an unauthenticated redirection loop.

Technical Root Cause Analysis

Upon associating with an open or web-authenticated Wi-Fi SSID, mobile operating systems automatically launch a Captive Network Assistant (CNA) sub-routine. Apple iOS connects to http://captive.apple.com/hotspot-detect.html, while Android probes http://connectivitycheck.gstatic.com/generate_204.

When guest endpoints attempt modern web browsing or apps trigger background HTTPS requests, FortiOS intercepts TCP port 443 on the captive portal interface. To redirect the user to the captive portal logon URL (e.g. https://guest.corporate.com:1003/fgtauth?...), FortiOS must complete an SSL/TLS handshake for the intercepted domain.

If the certificate bound under config user setting -> set auth-cert is a wildcard certificate (*.corporate.com) or the default self-signed Fortinet certificate, the mobile device detects a Subject Alternative Name (SAN) mismatch against the intercepted domain (e.g., captive.apple.com). Because Apple and Android CNA security frameworks enforce zero-exception TLS verification for captive network detection, the OS immediately terminates the CNA modal window or displays ERR_CERT_COMMON_NAME_INVALID. The device never receives the HTTP 302 redirect, leaving the client disconnected from the internet.

[FortiGate portal debug trace: diagnose debug application portal -1] portal_http_req: received GET request from 10.150.10.88 for 'https://captive.apple.com/hotspot-detect.html' portal_ssl_handshake: sending server certificate CN='*.corp.com' [Apple iOS CNA Console Log: Syslog] com.apple.captive: TLS handshake failed for captive.apple.com: Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred" com.apple.captive: Certificate name mismatch (*.corp.com does not match captive.apple.com) com.apple.captive: Suppressing CNA modal UI (untrusted MITM suspected). Network marked as offline.

Affected Firmware & Blast Radius Matrix

FortiOS Branch Vulnerable Builds Confirmed Clean Build Status & Workaround
FortiOS 7.2 All Builds (7.2.0–7.2.9) Configuration Profile Fix Bind dedicated FQDN cert + enable HTTP redirect
FortiOS 7.4 All Builds (7.4.0–7.4.4) Configuration Profile Fix Set explicit auth-portal-addr and DNS A-record
FortiOS 7.0 All Builds (7.0.0–7.0.16) Configuration Profile Fix Exempt CNA HTTP probes from SSL interception

Platform Impact: All FortiGate appliances managing wireless LANs (FortiAP) or wired guest VLANs running captive portal authentication for iOS, macOS, and Android devices.

Step 01: Free Verification CLI (Safe Read-Only)

Execute these diagnostic commands to inspect connected wireless station authentication states and check captive portal certificate bindings:

Diagnostic Commands

# 1. Inspect connected guest wireless station MACs and auth flags
diagnose wireless-controller wlc list-sta | grep -B 2 -A 6 "guest"

# 2. View active captive portal certificate and redirect settings
show user setting

# 3. Check active captive portal authenticated user list
diagnose user captive-portal-client list

# 4. Monitor wireless authentication controller events in real-time
diagnose debug reset
diagnose debug application cw_acd -1
diagnose debug enable

Remediation & Workaround Steps (Teaser Preview)

Step-by-step remediation procedures available in the interactive Ferrite platform:

Step 02: Bind Discrete Commercial FQDN Certificate under user setting

Install a trusted publicly signed certificate matching the exact portal FQDN (e.g. guest.corp.com) without wildcards.

🔒 Interactive CLI Available in Ferrite Runbook #23

Step 03: Enable Pure HTTP Redirection for Mobile Probe Interception

Configure interface captive portal settings to redirect plain HTTP port 80 probes cleanly without attempting HTTPS interception.

🔒 Interactive CLI Available in Ferrite Runbook #23

Step 04: Configure Split-DNS / Local Gateway A-Record for Portal FQDN

Ensure the guest VLAN DHCP DNS server resolves guest.corp.com directly to the local FortiGate interface IP.

🔒 Interactive CLI Available in Ferrite Runbook #23
⚡ Ferrite Platform Superpowers

Execute the Complete Runbook with Live Browser Automation

Connect your FortiGate via browser console (Web Serial) or local SSH bridge, verify each command in real-time, generate ready-to-run Tera Term scripts, and export sanitized TAC dossiers.

Live Browser Automation Direct terminal connection with live step checkoff.
📟
1-Click Tera Term (.ttl) Generate scripts for air-gapped jumpboxes.
🛡️
Zero-Trust Scrubber Scrub serials and credentials in local browser RAM.
📄
TAC P1 Escalation Dossier Standardized evidence export with SHA-256 seal.

Frequently Asked Questions

Why does the captive portal sheet fail to open on iOS and Android?

Apple CNA and Android require seamless HTTP probe redirection. If the FortiGate intercepts HTTPS requests using a wildcard or self-signed certificate, the mobile OS halts execution due to strict TLS verification rules, suppressing the login modal sheet.

Can we use HTTP instead of HTTPS for the captive portal?

While HTTP probe interception should be used to trigger the initial redirect, credentials must be submitted over HTTPS with a valid certificate to protect user passwords from cleartext interception.

Why does the portal URL show an IP address instead of our domain?

If auth-portal-addr is not configured under config user setting, FortiOS defaults to using the physical interface IP address, which generates browser certificate warnings.