Skip to content
OpenAdvisories
High · 8.2 CVE-2021-43860 EUVD-2021-30724

Permissions granted to applications can be hidden from the user at install time

Published Jan 12, 2022 · Updated Aug 4, 2024 · Assigned by GitHub_M

Description

Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.12.3 and 1.10.6, Flatpak doesn't 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, in the case that there's a null byte in the metadata file of an app. Therefore apps can grant themselves permissions without the consent of the user. Flatpak shows permissions to the user during install by reading them from the "xa.metadata" key in the commit metadata. This cannot contain a null terminator, because it is an untrusted GVariant. Flatpak compares these permissions to the *actual* metadata, from the "metadata" file to ensure it wasn't lied to. However, the actual metadata contents are loaded in several places where they are read as simple C-style strings. That means that, if the metadata file includes a null terminator, only the content of the file from *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. So maliciously crafted apps can give themselves hidden permissions. Users who have Flatpaks installed from untrusted sources are at risk in case the Flatpak has a maliciously crafted metadata file, either initially or in an update. This issue is patched in versions 1.12.3 and 1.10.6. As a workaround, users can manually check the permissions of installed apps by checking the metadata file or the xa.metadata key on the commit metadata.

Affected products

VendorProductAffectedFixed
flatpak flatpak >= 1.11.0, < 1.12.3, < 1.10.6 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 flatpak 1.12.3-1 —
Debian 13 flatpak 1.12.3-1 —
Debian 12 flatpak 1.12.3-1 —
Debian 11 flatpak 1.10.7-0+deb11u1 DSA-5049-1
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS flatpak No fix yet —
Ubuntu Pro 20.04 LTS flatpak No fix yet —
Ubuntu Pro 18.04 LTS flatpak No fix yet —
ReleasePackageFixed inAdvisory
RHEL 8 flatpak +4 1.8.7-1.el8 RHSA-2022:1792

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 flatpak +4 1.8.7-1.el8 ALSA-2022:1792

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 flatpak 1.8.7-1.el8 RLSA-2022:1792
ReleasePackageFixed inAdvisory
SLES 15 SP3 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLES 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLES 15 SP1 flatpak 1.2.3-150100.4.8.1 SUSE-SU-2022:3284-1
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLES for SAP 15 SP1 flatpak 1.2.3-150100.4.8.1 SUSE-SU-2022:3284-1
SLE Real Time 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLE HPC 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLE HPC 15 SP1 flatpak 1.2.3-150100.4.8.1 SUSE-SU-2022:3284-1
SUSE Manager Server 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Manager Retail Branch Server 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Manager Proxy 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Enterprise Storage 7 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Enterprise Storage 6 flatpak 1.2.3-150100.4.8.1 SUSE-SU-2022:3284-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed flatpak 1.12.3-1.1 openSUSE-SU-2024:11740-1
openSUSE Leap 15.3 flatpak 1.10.7-4.12.1 openSUSE-SU-2022:0712-1
ReleasePackageFixed inAdvisory
Alpine v3.24 flatpak 1.12.3-r0 —
Alpine v3.23 flatpak 1.12.3-r0 —
Alpine v3.22 flatpak 1.12.3-r0 —
Alpine v3.21 flatpak 1.12.3-r0 —
Alpine v3.20 flatpak 1.12.3-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 flatpak 1.12.3-r0 —
Alpine v3.18 flatpak 1.12.3-r0 —
Alpine v3.17 flatpak 1.12.3-r0 —
Alpine v3.16 flatpak 1.12.3-r0 —
Alpine v3.15 flatpak 1.12.3-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2 flatpak +2 1.0.9-10.amzn2.0.4 ALAS2-2024-2518
Amazon Linux 2 flatpak-builder 1.0.0-10.amzn2.0.4 ALAS2-2024-2518

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 flatpak +4 1.8.7-1.el8 ELSA-2022-1792

Advisories 11

References