CVE-2026-45514 AI-generated analysis
platform/frameworks/base, Autofill service UI (services/autofill/java/com/android/server/autofill/ui/SaveUi.java)
In the Autofill Save UI (SaveUi.java), links in autofill-service-supplied custom descriptions are now restricted to http/https URLSpans, and the PendingIntent SaveUi builds in its startActivity override is created with FLAG_IMMUTABLE instead of FLAG_MUTABLE | FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT.
Root cause
SaveUi made the ClickableSpans of the custom description text clickable via LinkMovementMethod without inspecting URLSpan targets, so any scheme was accepted. SaveUi's startActivity override wrapped the intent into PendingIntent.getActivityAsUser(this, 0, intent, PendingIntent.FLAG_MUTABLE | PendingIntent.FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT, ...) and launched it through startIntentSenderWithRestore with the same intent as fill-in. Per the commit message, custom schemes allowed hijacking and the mutable PendingIntent allowed intent manipulation by recipient applications.
How the fix works
- SaveUi.java, method following applyTextViewStyle (hunk at old line 566, name not shown): iterates the ClickableSpans; for every URLSpan, if getURL() is null or isHttpOrHttps(Uri.parse(url)) is false, the span is removed from the SpannableStringBuilder (spansRemoved = true); otherwise hasValidLink = true. Non-URLSpan ClickableSpans set hasValidLink = true. If any span was removed, textView.setText(ssb) is re-applied; LinkMovementMethod is installed only if hasValidLink.
- SaveUi.java: new static isHttpOrHttps(Uri) returns true only for scheme equalsIgnoreCase "http" or "https" (null Uri returns false).
- SaveUi.java, overridden startActivity: calls the new addRestoreSessionToken(intent) before creating the PendingIntent, then creates it with PendingIntent.FLAG_IMMUTABLE only (FLAG_MUTABLE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT removed), and passes new Intent() as the fill-in intent to startIntentSenderWithRestore since fill-in data is ignored for immutable PendingIntents.
- SaveUi.java, startIntentSenderWithRestore: no longer puts AutofillManager.EXTRA_RESTORE_SESSION_TOKEN itself; the token is now added by callers via addRestoreSessionToken(intent), which does intent.putExtra(EXTRA_RESTORE_SESSION_TOKEN, mPendingUi.getToken()).
- SaveUi.java, custom-description PendingIntent path (hunk at old line 416): addRestoreSessionToken(intent) is called on the fill-in intent before startIntentSenderWithRestore(pendingIntent, intent), because the base intent of the provider's PendingIntent cannot be modified (per the code comment).
Completeness
- Scheme restriction is applied only to URLSpan instances; any other ClickableSpan subclass present in the text is left clickable and counts as a valid link (hasValidLink = true in the else branch).
- The material does not show whether text later altered through BatchUpdates/InternalTransformation is re-validated by the span loop.
- The PendingIntent hardening covers only the PendingIntent that SaveUi itself creates in startActivity; the provider-supplied PendingIntent path is unchanged apart from where the restore token is added (the code comment says that base intent cannot be modified).
- Only the scheme is checked; no host/path validation is performed.
Behavior changes
- Links with a scheme other than http/https (or with a null URL) in Save UI custom descriptions are no longer clickable; their URLSpan is removed and the text is re-set.
- If no valid link remains in a TextView, LinkMovementMethod is not installed on it.
- The PendingIntent built in startActivity is immutable; the fill-in intent passed is an empty Intent and EXTRA_RESTORE_SESSION_TOKEN travels in the base intent instead.
- FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT is no longer set on that PendingIntent.
Per major
- Android 14: same fix: platform/frameworks/base 3519be0f11c7 in android-security-14.0.0_r29; PendingIntent call uses options=null and UserHandle.CURRENT; 8/8 patched lines present at android-security-14.0.0_r31.
- Android 15: same fix (adapted context): 6c6471fc4718 in android-security-15.0.0_r17; identical logic, PendingIntent call carries ActivityOptions with MODE_BACKGROUND_ACTIVITY_START_ALLOWED; 8/8 lines present at android-security-15.0.0_r19.
- Android 16: same fix: fb6a81e33d54 in android-security-16.0.0_r8; diff identical to Android 15 (same file blob ids a92d5d6f19f6..e842bae0d8d4); 8/8 lines present at android-security-16.0.0_r10.
- Android 17: same fix (adapted context): 4d1f600cbcbb in android-security-17.0.0_r1; applied in code that already selects targetUser via sSupportMultiUserMultiDisplay (pre-existing context, unchanged by the fix); 8/8 lines present at android-security-17.0.0_r3.
Unknowns
- The name and caller of the method containing the span loop (hunk at old line 566) are not shown in the diff.
- Whether the Save UI text can be mutated after the span check (e.g. via BatchUpdates/InternalTransformation) is not shown.
- The identity under which the SaveUi PendingIntent is created and the exact privilege gained beyond the bulletin's EoP/High rating are not described in the material.