CVE-2021-39670: Local PDoS in WallpaperManager.java

platform/frameworks/base Updated 02 Oct 2025

Summary

01/05/2022
Yes i
High
Not published

CVE-2021-39670: In setStream of WallpaperManager.java, there is a possible way to cause a permanent DoS due to improper input validation. Affects platform/frameworks/base across 2 version ranges.

>= 12:0, < 12:2022-05-01 >= 12L:0, < 12L:2022-05-01

Fixed in 12:2022-05-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 WallpaperManager.java is a component of the Android platform's base framework. It is responsible for managing the device's wallpaper, allowing users to set and customize their device's background image. The WallpaperManager provides various methods for setting wallpapers, including setStream, which allows users to set a wallpaper from a data stream. This vulnerability affects the WallpaperManager's setStream method in Android versions 12 and 12L.

Vulnerability Detail

The setStream method in WallpaperManager.java lacks proper input validation, enabling an attacker with user execution privileges to cause a permanent denial of service (DoS) on the affected device. By setting a large wallpaper using setStream, an attacker can trigger a local DoS condition without requiring any user interaction. This vulnerability has a high severity rating and can lead to a complete loss of functionality on the affected device.

How To Fix

Minimum fixed version

12:2022-05-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

As a workaround, users can avoid setting large wallpapers using the setStream method. Instead, they can use other methods provided by the WallpaperManager to set wallpapers, such as setResource or setBitmap. These alternative methods have proper input validation and are not affected by this vulnerability. Here is an example of setting a wallpaper using the setResource method:

WallpaperManager wallpaperManager = WallpaperManager.getInstance(context);
wallpaperManager.setResource(R.drawable.wallpaper);

Conclusion

The WallpaperManager.java component in the Android platform's base framework is vulnerable to a local denial of service (DoS) attack. By setting a large wallpaper using the setStream method, an attacker with user execution privileges can cause a permanent DoS condition on the affected device. To mitigate this vulnerability, it is recommended to update the Android platform's base framework to version 12 or later. Users can also use alternative methods provided by the WallpaperManager to set wallpapers. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/frameworks/base →

Share this vulnerability

FAQ

This vulnerability allows an attacker to cause a permanent denial of service (DoS) on the affected device by setting a large wallpaper. The device may become unresponsive and require a reboot to recover.

No, user interaction is not required for exploitation. An attacker with user execution privileges can trigger the DoS condition by setting a large wallpaper using the setStream method.

This vulnerability affects Android versions 12 and 12L. Devices running these versions of the Android platform's base framework are vulnerable to the local denial of service (DoS) attack.

Yes, a fix for this vulnerability is available in the Android platform's base framework version 12 and later. It is recommended to update the affected devices to the fixed version to mitigate the risk.

Yes, users can avoid setting large wallpapers using the setStream method. Instead, they can use other methods provided by the WallpaperManager, such as setResource or setBitmap, which are not affected by this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for platform/frameworks/base.

How To Fix

Minimum fixed version

12:2022-05-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