PT-2022-11921 · Flatpak+8 · Flatpak+8

Ryan Gonzalez

·

Published

2022-01-12

·

Updated

2024-06-15

·

CVE-2021-43860

CVSS v3.1

8.6

High

VectorAV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Name of the Vulnerable Software and Affected Versions Flatpak versions prior to 1.12.3 and 1.10.6
Description The issue arises from Flatpak's failure to properly validate that the permissions displayed to the user for an app at install time match the actual permissions granted to the app at runtime, particularly when there's a null byte in the metadata file of an app. This allows apps to grant themselves permissions without the user's consent. The permissions are shown to the user by reading them from the xa.metadata key in the commit metadata, which cannot contain a null terminator because it is an untrusted GVariant. However, the actual metadata contents are loaded in several places where they are read as simple C-style strings, meaning that if the metadata file includes a null terminator, only the content before the terminator gets compared to xa.metadata. Thus, any permissions that appear in the metadata file after a null terminator are applied at runtime but not shown to the user. Users who have Flatpaks installed from untrusted sources are at risk if the Flatpak has a maliciously crafted metadata file, either initially or in an update.
Recommendations For versions prior to 1.12.3 and 1.10.6, update to version 1.12.3 or 1.10.6 to resolve the issue. As a temporary workaround, users can manually check the permissions of installed apps by checking the metadata file or the xa.metadata key on the commit metadata.

Fix

Incorrect Default Permissions

Improper Privilege Management

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

ALSA-2022:1792
ALT-PU-2022-1080
ALT-PU-2022-1126
CESA-2022_1792
CVE-2021-43860
DSA-5049-1
GHSA-QPJC-VQ3C-572J
MGASA-2022-0131
OESA-2022-1520
OPENSUSE-SU-2022:0712-1
OPENSUSE-SU-2022_0712-1
OPENSUSE-SU-2024:11740-1
RHSA-2022:1792
RHSA-2022_1792
RLSA-2022:1792
SUSE-SU-2022:0712-1
SUSE-SU-2022:3284-1
SUSE-SU-2022_0712-1

Affected Products

Alt Linux
Almalinux
Astra Linux
Centos
Flatpak
Red Hat
Red Os
Rocky Linux
Suse