Skip to main content
Vulnerability Database/CVE-2024-31315

CVE-2024-31315: Google Android Privilege Escalation Flaw

CVE-2024-31315 is a privilege escalation vulnerability in Google Android that allows apps to hide notification access from settings. This post explains its technical details, affected versions, and mitigation steps.

Published:

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-31315 Overview

CVE-2024-31315 is a local privilege escalation vulnerability in Android's ManagedServices.java component. The flaw stems from improper input validation across multiple functions that handle notification listener services. An attacker can abuse this weakness to hide an application that holds notification access from the Device & app notifications settings screen. This conceals malicious notification-listening apps from users reviewing granted permissions. Google addressed the issue in the June 2024 Android Security Bulletin, with a patch committed to the Android Open Source Project (AOSP). The vulnerability affects Android versions 12.0, 12.1, 13.0, and 14.0.

Critical Impact

A malicious app can gain and retain notification access while remaining hidden from the standard settings UI, enabling sustained local privilege escalation with only limited user interaction.

Affected Products

  • Google Android 12.0
  • Google Android 12.1
  • Google Android 13.0
  • Google Android 14.0

Discovery Timeline

  • 2024-06-01 - Fix published in the Android Security Bulletin June 2024
  • 2024-07-09 - CVE-2024-31315 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in the NVD database

Technical Details for CVE-2024-31315

Vulnerability Analysis

The vulnerability resides in ManagedServices.java, a core Android framework class that governs bound services such as NotificationListenerService. Multiple functions in this class fail to validate input used when reconciling the list of enabled services against the UI that displays them. By crafting values that the framework accepts but the settings UI cannot render, an attacker causes the app to disappear from the Device & app notifications settings while retaining its granted notification access. Because notification listeners receive the content of every system and application notification, retaining this access while remaining hidden creates a durable local foothold. Classified under [CWE-266] (Incorrect Privilege Assignment), the issue results in unauthorized elevation within the user's own device context.

Root Cause

The root cause is improper input validation in the component list parsing and display logic of ManagedServices.java. The framework trusts stored service identifiers without enforcing the invariants expected by the settings activity. This mismatch between the privilege store and the UI representation allows an attacker-controlled app to be enabled but not displayed.

Attack Vector

Exploitation requires local access and user interaction. The user must initially grant notification access to the attacker's app, typically through a social engineering lure. Once granted, the app leverages the parsing flaw to remove itself from the settings view while continuing to receive notifications. Review the AOSP patch commit a9ee2793 for the authoritative technical fix details. No synthetic proof-of-concept is published for this entry.

Detection Methods for CVE-2024-31315

Indicators of Compromise

  • Applications that hold BIND_NOTIFICATION_LISTENER_SERVICE but do not appear in the Device & app notifications settings list.
  • Discrepancies between the output of adb shell dumpsys notification and the apps shown in the UI.
  • Newly installed apps that request notification access shortly after sideloading or install from untrusted sources.

Detection Strategies

  • Enumerate enabled notification listeners programmatically via NotificationManager.getEnabledListenerPackages() and compare against user-visible settings.
  • Baseline mobile endpoints to identify apps granted notification access and alert on unexpected grants.
  • Review mobile device management (MDM) compliance logs for devices running Android 12 through 14 that have not received the June 2024 security patch level.

Monitoring Recommendations

  • Track Android security patch level (ro.build.version.security_patch) across the fleet and flag devices below 2024-06-01.
  • Monitor for apps requesting BIND_NOTIFICATION_LISTENER_SERVICE outside of approved productivity, accessibility, or security software.
  • Correlate notification-listener grants with install source metadata to identify sideloaded applications.

How to Mitigate CVE-2024-31315

Immediate Actions Required

  • Apply the June 2024 Android security patch level or later on all affected devices.
  • Audit all applications currently granted notification access and revoke permissions for any unrecognized or non-essential apps.
  • Enforce MDM policy to block installation of apps from unknown sources on managed devices.

Patch Information

Google released the fix as part of the Android Security Bulletin June 2024. The underlying change is published in the AOSP commit a9ee2793 to platform/frameworks/base. Device manufacturers ship this fix through their respective monthly security update channels. Users should verify that their device reports a security patch level of 2024-06-01 or later.

Workarounds

  • Deny notification access to any app that does not require it, and periodically re-verify granted listeners via adb shell dumpsys notification.
  • Restrict installation sources to Google Play and vetted enterprise app stores through MDM configuration.
  • Educate users to decline notification access prompts from apps that do not have a clear functional justification.
bash
# List currently enabled notification listener services
adb shell settings get secure enabled_notification_listeners

# Verify installed security patch level
adb shell getprop ro.build.version.security_patch

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.