CVE-2021-43860
Summary
| CVE | CVE-2021-43860 |
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-01-12 22:15:00 UTC |
| Updated | 2023-12-23 10:15:00 UTC |
| 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. |
NVD Known Affected Configurations (CPE 2.3)
References
| Reference | Source | Link | Tags |
|---|
| Release Release 1.12.3 · flatpak/flatpak · GitHub |
MISC |
github.com |
|
| Add test for metadata validation · flatpak/flatpak@54ec1a4 · GitHub |
MISC |
github.com |
|
| Require metadata in commit also for OCI remotes · flatpak/flatpak@93357d3 · GitHub |
MISC |
github.com |
|
| Debian -- Security Information -- DSA-5049-1 flatpak |
DEBIAN |
www.debian.org |
|
| Ensure that bundles have metadata on install · flatpak/flatpak@65cbfac · GitHub |
MISC |
github.com |
|
| Fix metadata file contents after null terminators being ignored · flatpak/flatpak@ba818f5 · GitHub |
MISC |
github.com |
|
| CVE-2021-43860: Permissions granted to applications can be hidden from the user at install time · Advisory · flatpak/flatpak · GitHub |
CONFIRM |
github.com |
|
| [SECURITY] Fedora 35 Update: flatpak-1.12.3-1.fc35 - package-announce - Fedora Mailing-Lists |
|
lists.fedoraproject.org |
|
| Release Release 1.10.6 · flatpak/flatpak · GitHub |
MISC |
github.com |
|
| Flatpak: Multiple Vulnerabilities (GLSA 202312-12) — Gentoo security |
|
security.gentoo.org |
|
| Transaction: Fail the resolve if xa.metadata invalid or missing · flatpak/flatpak@d9a8f9d · GitHub |
MISC |
github.com |
|
| [SECURITY] Fedora 35 Update: flatpak-1.12.3-1.fc35 - package-announce - Fedora Mailing-Lists |
FEDORA |
lists.fedoraproject.org |
|
| CVE Program record |
CVE.ORG |
www.cve.org |
canonical |
| NVD vulnerability detail |
NVD |
nvd.nist.gov |
canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 159836 Oracle Enterprise Linux Security Update for flatpak (ELSA-2022-1792)
- 179013 Debian Security Update for flatpak (DSA 5049-1)
- 184374 Debian Security Update for flatpak (CVE-2021-43860)
- 240297 Red Hat Update for flatpak (RHSA-2022:1792)
- 282251 Fedora Security Update for flatpak (FEDORA-2022-825ca6bf2b)
- 282319 Fedora Security Update for flatpak (FEDORA-2022-8c64cb0992)
- 354313 Amazon Linux Security Advisory for flatpak : ALAS2022-2022-179
- 354489 Amazon Linux Security Advisory for flatpak : ALAS2022-2022-021
- 502084 Alpine Linux Security Update for flatpak
- 710812 Gentoo Linux Flatpak Multiple Vulnerabilities (GLSA 202312-12)
- 751803 SUSE Enterprise Linux Security Update for flatpak (SUSE-SU-2022:0712-1)
- 751816 OpenSUSE Security Update for flatpak (openSUSE-SU-2022:0712-1)
- 752593 SUSE Enterprise Linux Security Update for flatpak (SUSE-SU-2022:3284-1)
- 940529 AlmaLinux Security Update for flatpak (ALSA-2022:1792)
- 960317 Rocky Linux Security Update for flatpak (RLSA-2022:1792)