Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-31310 Overview
CVE-2024-31310 is a local privilege escalation vulnerability in the Android Autofill framework. The flaw resides in the newServiceInfoLocked method of AutofillManagerServiceImpl.java, where improper input validation allows an enabled Autofill service app to be hidden from the Autofill service settings UI. An attacker leveraging this weakness can conceal a malicious Autofill service from the user, escalating local privileges without requiring additional execution rights. User interaction is required to trigger exploitation. The issue affects Android 12, 12.1, 13, and 14, and was addressed in the Android Security Bulletin dated June 2024.
Critical Impact
A malicious application can remain enabled as an Autofill service while being invisible in system settings, enabling credential harvesting without user awareness.
Affected Products
- Google Android 12.0
- Google Android 12.1
- Google Android 13.0
- Google Android 14.0
Discovery Timeline
- 2024-07-09 - CVE-2024-31310 published to NVD
- 2024-06-01 - Fix included in the Android Security Bulletin June 2024
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-31310
Vulnerability Analysis
The vulnerability lives in AutofillManagerServiceImpl.newServiceInfoLocked, a method that constructs service metadata for the Autofill subsystem. The method fails to properly validate inputs supplied by third-party applications registering as Autofill providers. A crafted application can supply values that cause the Autofill settings UI to omit the registered service from its visible list while the service remains active in the background. The user retains the belief that no third-party Autofill service is enabled, while the malicious provider continues to receive Autofill requests containing sensitive form data such as usernames, passwords, and payment details. The weakness is categorized under [CWE-20: Improper Input Validation].
Root Cause
The root cause is missing sanitization and validation of service metadata processed inside newServiceInfoLocked. The Autofill framework trusts the service descriptor fields used to render entries in the settings UI. Malformed values bypass the enumeration logic that lists enabled Autofill services, breaking the integrity of the user-facing security control.
Attack Vector
Exploitation requires local installation of a malicious application that registers as an Autofill service. The user must interact by enabling the service or by being tricked into enabling it. Once enabled, the attacker-controlled application remains hidden from the Autofill section of system settings. This prevents the user from disabling or removing the provider through the standard UI path, extending the attacker's foothold and enabling continued collection of form data submitted across other applications.
No public proof-of-concept code is available for this vulnerability. Refer to the Android Source Code Update for the fix implementation details.
Detection Methods for CVE-2024-31310
Indicators of Compromise
- Applications registered with the android.service.autofill.AutofillService intent action that do not appear in the Autofill settings screen.
- Unexpected BIND_AUTOFILL_SERVICE permission grants in package manager state dumps.
- Autofill request events in logcat originating from packages the user does not recognize.
Detection Strategies
- Enumerate installed Autofill services directly via adb shell dumpsys autofill and compare the output against what the settings UI displays to the user.
- Audit installed packages for those declaring the AutofillService component but lacking a recognizable publisher or signing certificate.
- Deploy mobile threat defense tooling capable of flagging applications that request BIND_AUTOFILL_SERVICE outside of known enterprise-approved providers.
Monitoring Recommendations
- Monitor Android device patch levels across the fleet and alert on devices still reporting a security patch level earlier than June 2024.
- Track installation of applications requesting Autofill-related permissions through enterprise mobility management telemetry.
- Review MDM compliance reports for devices running Android 12 through 14 that have not received the June 2024 Google security update.
How to Mitigate CVE-2024-31310
Immediate Actions Required
- Apply the June 2024 Android security patch level (2024-06-01 or later) to all affected Android 12, 12.1, 13, and 14 devices.
- Audit installed Autofill services on managed devices using dumpsys autofill and remove any unrecognized providers.
- Restrict installation of applications from unknown sources through enterprise mobility management policies.
Patch Information
Google addressed CVE-2024-31310 in the Android Security Bulletin June 2024. The upstream fix is published in AOSP under commit 74afbb05ca08738f66d82df867bbee66de4884bc, which hardens input validation inside newServiceInfoLocked. Device vendors incorporate the fix through their monthly security update cycle.
Workarounds
- Disable all third-party Autofill services and rely on the platform default provider until the patch is applied.
- Enforce an application allowlist through enterprise mobility management to block untrusted packages from registering Autofill services.
- Educate users to only enable Autofill providers from vetted, enterprise-approved publishers.
# Verify current Android security patch level and enumerate Autofill services
adb shell getprop ro.build.version.security_patch
adb shell dumpsys autofill | grep -i "service"
adb shell pm list packages -f | grep -i autofill
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

