CVE-2026-55271 AI-generated analysis
platform/packages/apps/ContactsPicker, ContactsPickerActivity intent forwarding (ACTION_PICK takeover path)
ContactsPickerActivity now forwards ACTION_PICK intents to the preferred handler or the chooser with startActivityAsCaller instead of startActivity, and the manifest now requests START_ACTIVITY_AS_CALLER. The forwarded launch is therefore attributed to the original caller and does not carry the privileged system picker's permissions.
Root cause
ContactsPickerActivity is a system app holding READ_CONTACTS, INTERACT_ACROSS_USERS_FULL, MANAGE_CONTACTS_PICKER_SESSION and other permissions. It receives ACTION_PICK / PICK_CONTACTS intents. When it decides not to handle one internally, it forwards it with plain startActivity: in forwardToPreferredActionPickHandler as Intent(intent) with the preferred component and FLAG_ACTIVITY_FORWARD_RESULT, and in the chooser forwarding path as a chooserIntent. The platform therefore treated the picker, not the original caller, as the launching app. Per the commit message this allowed abusing access to contacts data or redirecting the intent.
How the fix works
- AndroidManifest.xml: adds <uses-permission android:name="android.permission.START_ACTIVITY_AS_CALLER" /> so the picker can use startActivityAsCaller.
- src/com/android/contactspicker/ContactsPickerActivity.kt:forwardToPreferredActionPickHandler: replaces startActivity(preferredActivityIntent) with startActivityAsCaller(preferredActivityIntent, null, false, userId) inside a try block. On SecurityException it logs, calls setResult(RESULT_CANCELED), then falls through to finish() and returns true. On ActivityNotFoundException it logs and returns false, so the calling code falls back to forwardToOtherActionPickHandlersWithChooser.
- src/com/android/contactspicker/ContactsPickerActivity.kt (chooser forwarding, forwardToOtherActionPickHandlersWithChooser): replaces startActivity(chooserIntent) with startActivityAsCaller(chooserIntent, null, false, userId) and adds a SecurityException catch that logs and calls setResult(RESULT_CANCELED). The existing ActivityNotFoundException catch (log + Toast) is kept.
- tests/componenttests/.../ContactsPickerActivityTest.kt: replaces Espresso Intents with Instrumentation.ActivityMonitor checks, because per the commit startActivityAsCaller is a hidden platform API. Adds lowTargetSdk_withPreferredActivityAndActivityNotFound_fallsBackToChooser to cover the new fallback.
Completeness
- Both forwarding call sites in the diff (preferred handler and chooser) are converted. No other forwarding launch shows up in the provided context, but the full routeIntent logic is not shown.
- With startActivityAsCaller the launch is attributed to the original caller (per the commit message). The picker does not validate the target itself; it maps a SecurityException to RESULT_CANCELED.
- In forwardToPreferredActionPickHandler a SecurityException does not fall back to the chooser: the activity finishes with RESULT_CANCELED and returns true.
- The material does not show the code after the SecurityException catch in the chooser path (whether finish() follows).
- At android-security-17.0.0_r3 the code context shows startActivityAsCaller at line 173 and the manifest permission at line 52. The fix is therefore present even though the resolver reports only 6/8 lines matching.
Behavior changes
- Forwarded preferred-handler and chooser launches are attributed to the original calling app, not to com.android.contactspicker.
- If the original caller lacks permission to start the forwarded target, the picker logs a SecurityException and sets RESULT_CANCELED instead of starting it.
- If the preferred activity no longer exists (ActivityNotFoundException), the picker falls back to the chooser path instead of letting the exception propagate.
- The app now requests android.permission.START_ACTIVITY_AS_CALLER.
Per major
- Android 14: not affected per bulletin; code absent (packages/apps/ContactsPicker not present in android-security-14.0.0_r31)
- Android 15: not affected per bulletin; code absent (project not present in android-security-15.0.0_r19)
- Android 16: not affected per bulletin; code absent (project not present in android-security-16.0.0_r10)
- Android 17: same fix: commit 824770d6d42d in android-security-17.0.0_r1 (cherry-pick of two internal changes, Merged-In Ida4d0e9880af15258a97cedf5551367b21abd384); present at android-security-17.0.0_r3
Unknowns
- The full decision logic in routeIntent that chooses internal handling or forwarding (only the target SDK condition from the tests is visible).
- Whether finish() is called after the new SecurityException catch in the chooser forwarding path.
- How the chooserIntent is built from targetIntent.
- How the two internal cherry-picked commits (31861c55 and fef6b896) split the change; only the combined AOSP commit is provided.
- Where userId is defined in ContactsPickerActivity (it is used but not shown in the context).
- Protection level and platform enforcement of START_ACTIVITY_AS_CALLER (not shown in the material).