CVEfocus › CVE database › CVE-2021-43860

CVE-2021-43860Permissions granted to applications can be hidden from the user at install time

CVSS 8.2 HighEPSS 1.4% (higher than 73% of CVEs)Published 2022-01-12Updated 2024-08-04Assigner: GitHub_M

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.

CWE-269

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

24Fixed
3Fix pending
11Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04flatpakNot affected
vulnerable_code_not_present
Ubuntu 25.10flatpakNot affected
vulnerable_code_not_present
Ubuntu 22.04flatpakFix pendingUBUNTU-CVE-2021-43860
Ubuntu 20.04flatpakFix pendingUBUNTU-CVE-2021-43860
Ubuntu 18.04flatpakFix pendingUBUNTU-CVE-2021-43860
Debian 14flatpakFixed1.12.3-1DEBIAN-CVE-2021-43860
Debian 13flatpakFixed1.12.3-1DEBIAN-CVE-2021-43860
Debian 12flatpakFixed1.12.3-1DEBIAN-CVE-2021-43860
Red Hat Enterprise Linux 9flatpakNot affected
Red Hat Enterprise Linux 9flatpak-develNot affected
Red Hat Enterprise Linux 9flatpak-libsNot affected
Red Hat Enterprise Linux 9flatpak-selinuxNot affected
Red Hat Enterprise Linux 9flatpak-session-helperNot affected
Red Hat Enterprise Linux 8flatpakFixed0:1.8.7-1.el8RHSA-2022:1792
Red Hat Enterprise Linux 8flatpak-develFixed0:1.8.7-1.el8RHSA-2022:1792
Red Hat Enterprise Linux 8flatpak-libsFixed0:1.8.7-1.el8RHSA-2022:1792
Red Hat Enterprise Linux 8flatpak-selinuxFixed0:1.8.7-1.el8RHSA-2022:1792
Red Hat Enterprise Linux 8flatpak-session-helperFixed0:1.8.7-1.el8RHSA-2022:1792
Red Hat Enterprise Linux 7flatpakNot affected
Red Hat Enterprise Linux 7flatpak-builderNot affected
Red Hat Enterprise Linux 7flatpak-develNot affected
Red Hat Enterprise Linux 7flatpak-libsNot affected
AlmaLinux 8flatpakFixed1.8.7-1.el8ALSA-2022:1792
AlmaLinux 8flatpak-develFixed1.8.7-1.el8ALSA-2022:1792
AlmaLinux 8flatpak-libsFixed1.8.7-1.el8ALSA-2022:1792
AlmaLinux 8flatpak-selinuxFixed1.8.7-1.el8ALSA-2022:1792
AlmaLinux 8flatpak-session-helperFixed1.8.7-1.el8ALSA-2022:1792
Rocky Linux 8flatpakFixed0:1.8.7-1.el8RLSA-2022:1792
Alpine Linux 3.24flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.23flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.22flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.21flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.20flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.19flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.18flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.17flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.16flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860
Alpine Linux 3.15flatpakFixed1.12.3-r0ALPINE-CVE-2021-43860

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.