CVE-2021-0694: Insecure Regranting of FGS Permissions in platform/frameworks/base

platform/frameworks/base Updated 02 Oct 2025

Summary

01/04/2022
Yes i
High
Not published

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback