CVE-2021-0694: Insecure Regranting of FGS Permissions in platform/frameworks/base
Summary
CVE-2021-0694: In setServiceForegroundInnerLocked of ActiveServices.java, there is a possible way for a background application to regain foreground permissions due to insufficient background restrictions. Affects platform/frameworks/base versions >= 11:0, < 11:2022-04-01. Fixed in 11:2022-04-01. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The platform/frameworks/base package is a core component of the Android operating system. It provides fundamental functionalities and services for the Android framework. One of its key features is the management of foreground services (FGS), which allows applications to run in the foreground and interact with the user. FGS permissions are crucial for accessing certain resources and APIs. However, a vulnerability in the package allows a background application to regain foreground permissions, leading to a local escalation of privilege.
Vulnerability Detail
The vulnerability (CVE-2021-0694) originates from insufficient background restrictions in the setServiceForegroundInnerLocked function of ActiveServices.java. This allows a background application to reacquire foreground permissions even after the FGS calls stopForeground() and startForeground() have been made. Exploiting this vulnerability does not require any additional execution privileges or user interaction. The consequences of this vulnerability include potential unauthorized access to sensitive resources and the ability to perform actions with elevated privileges.
How To Fix
Minimum fixed version
11:2022-04-01
This is the first release that contains the fix.
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no specific workaround mentioned for this vulnerability. However, developers can mitigate the risk by ensuring that background applications do not have unnecessary foreground permissions and by regularly updating their applications to the latest fixed version of the platform/frameworks/base package.
Conclusion
The vulnerability (CVE-2021-0694) in the platform/frameworks/base package allows a background application to regain foreground permissions, potentially leading to local escalation of privilege. Developers should apply the provided fix from the Android Open Source Project to mitigate this vulnerability. Regularly updating applications to the fixed version is recommended. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for platform/frameworks/base →
FAQ
The vulnerability allows a background application to regain foreground permissions, potentially leading to unauthorized access to sensitive resources and the ability to perform actions with elevated privileges.
No, user interaction is not needed for exploitation. The vulnerability can be exploited by a background application without any additional execution privileges.
The severity of this vulnerability is rated as High. It has the potential to enable local escalation of privilege.
Yes, the vulnerability has been fixed in the platform/frameworks/base package. Developers should update their applications to the fixed version released on April 1, 2022 (version 11).
You can find more information about this vulnerability in the Android Open Source Vulnerability database: https://storage.googleapis.com/android-osv/ASB-A-183147114.json
Related vulnerabilities
Recent vulnerabilities recorded for platform/frameworks/base.