Insufficient policy enforcement in Web Authentication (Passkeys & Security Keys) (CVE-2026-13862)
The iOS passkey implementation injects a JavaScript shim that exposes the WebAuthn API on insecure HTTP origins, and the browser side only guards the origin check with a debug assertion that is removed in release builds. A network attacker in a man-in-the-middle position could therefore trigger a passkey prompt for a victim site over HTTP and obtain an assertion whose origin is insecure.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: The iOS Passkey implementation bypasses secure context checks by unconditionally injecting a JavaScript shim that exposes navigator.credentials to HTTP origins. Additionally, the browser process fails to validate the caller's origin scheme, relying on a DCHECK that is compiled out in release builds. This allows a MITM attacker to initiate and intercept passkey flows on insecure connections.
Affected files:
components/webauthn/ios/passkey_tab_helper.mmcomponents/webauthn/ios/resources/passkey_controller.tscomponents/webauthn/core/browser/webauthn_security_utils.cccomponents/webauthn/core/browser/remote_validation.cccomponents/webauthn/ios/passkey_java_script_feature.mm
Estimated timestamp from git blame: 2026-01-28
Description
The new iOS Passkey implementation (currently behind the kIOSPasskeyModalLoginWithShim and kIOSPasskeyConditionalLoginWithShim flags) introduces a critical security flaw by failing to enforce WebAuthn's secure context (HTTPS/localhost) requirement.
This vulnerability manifests in two distinct layers of the implementation:
-
JavaScript Shim Bypass (
passkey_controller.ts): The implementation injects a JavaScript shim into web frames viaPasskeyJavaScriptFeature. Incomponents/webauthn/ios/resources/passkey_controller.ts(line 861), the script unconditionally overrides thenavigator.credentialsobject usingObject.defineProperty. It fails to verifywindow.isSecureContextbefore exposing the API. While standard WebKit/Blink correctly hides the WebAuthn API on insecure contexts, this shim forcibly recreates it, making it accessible to attacker-controlled HTTP origins. -
Missing Browser-Side Validation (
passkey_tab_helper.mm): When the shim sends a passkey request (viasendWebKitMessage) to the browser process,PasskeyTabHelper::HandleGetRequestedEventandHandleCreateRequestedEventhandle the request. Both functions directly callOriginIsAllowedToClaimRelyingPartyId(rp_id, origin)(e.g., line 197) to validate the Relying Party (RP) ID against the caller's origin. However, they fail to explicitly call the core secure context validation function,OriginAllowedToMakeWebAuthnRequests. WhileOriginIsAllowedToClaimRelyingPartyId(incomponents/webauthn/core/browser/webauthn_security_utils.cc, line 40) contains aDCHECK(OriginAllowedToMakeWebAuthnRequests(caller_origin) == ValidationStatus::kSuccess),DCHECKmacros are compiled out in production (Release) builds. Consequently, the check is completely bypassed, and the request proceeds even if the origin is an insecurehttp://URL.
Potential Attack Scenario (Unverified)
(Note: These are suggested steps based on code analysis; a working Proof of Concept has not yet been executed by the AI agent.)
- A victim attempts to visit an RP's site (e.g.,
http://victim-rp.com) while an attacker has a network MITM position. - The attacker intercepts the traffic, downgrades it to HTTP, and serves a malicious webpage containing JavaScript.
- Chrome on iOS loads the page, injecting the insecure
passkey_controller.tsshim. - The attacker's JavaScript calls
navigator.credentials.get({ publicKey: { rpId: 'victim-rp.com', ... } }). - The shim intercepts the call and forwards the request to the browser process.
- Because the
DCHECKinOriginIsAllowedToClaimRelyingPartyIdis compiled out, the browser accepts the HTTP origin (http://victim-rp.com) as valid for the RP ID (victim-rp.com). - The user is presented with a legitimate-looking native iOS Passkey prompt for
victim-rp.com. - The user approves the prompt (e.g., using Face ID).
- The generated WebAuthn assertion (which includes
"origin": "http://victim-rp.com"in itsclientDataJSON) is returned to the attacker's JavaScript. - The attacker submits the assertion to the RP's secure backend. If the RP relies primarily on the cryptographic signature and
rpIdHash(a common implementation flaw) and fails to strictly reject thehttp://scheme in theclientDataJSON.origin, the attacker achieves account takeover.
Suggested Fix
- JavaScript Shim: Update
components/webauthn/ios/resources/passkey_controller.tsto checkwindow.isSecureContextbefore overridingnavigator.credentials. - Browser Process: In
components/webauthn/ios/passkey_tab_helper.mm, explicitly callOriginAllowedToMakeWebAuthnRequests(web_frame->GetSecurityOrigin())at the beginning ofHandleGetRequestedEventandHandleCreateRequestedEvent. If the validation fails (i.e., returns anything other thanValidationStatus::kSuccess), the request must be immediately rejected with aNotAllowedError.
Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. Please feel free to reach out to me if you have concerns or feedback.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the shim recreates navigator.credentials without checking window.isSecureContext, and the browser-side handler relies on a DCHECK for the secure context check, which is compiled out in release builds.
Impact
Account takeover could follow only if the relying party's backend accepts an assertion whose clientDataJSON origin is HTTP; the scenario is unverified and no proof of concept was executed.
What the attacker needed
Attacker on the network path; victim uses Chrome on iOS; passkey feature flags enabled; relying party accepts HTTP origin
The fix
The shim should check window.isSecureContext before overriding navigator.credentials, and the browser handlers should explicitly call the secure context validation and reject failures with NotAllowedError.
How it was found
- A victim tries to reach a relying party site while an attacker sits on the network.
- The attacker downgrades the connection to HTTP and serves a malicious page.
- Chrome on iOS loads the page and injects the passkey shim.
- The attacker's script calls the credentials API for the victim's relying party ID.
- The shim forwards the request and the browser accepts the HTTP origin.
- The user approves the native passkey prompt and the assertion returns to the attacker's script.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Passkeys are a modern way to sign in without a password, and browsers are supposed to offer them only on secure HTTPS pages. This code adds passkey support to Chrome on iOS but forgets that rule, so a page loaded over plain HTTP can also ask for a passkey. Someone sitting on the network could then trick the user into approving a passkey prompt for a site they do not control.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.