CVE-2021-21381
Summary
| CVE | CVE-2021-21381 |
| State | PUBLIC |
| Assigner | [email protected] |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2021-03-11 17:15:00 UTC |
| Updated | 2023-12-23 10:15:00 UTC |
| Description | Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In Flatpack since version 0.9.4 and before version 1.10.2 has a vulnerability in the "file forwarding" feature which can be used by an attacker to gain access to files that would not ordinarily be allowed by the app's permissions. By putting the special tokens `@@` and/or `@@u` in the Exec field of a Flatpak app's .desktop file, a malicious app publisher can trick flatpak into behaving as though the user had chosen to open a target file with their Flatpak app, which automatically makes that file available to the Flatpak app. This is fixed in version 1.10.2. A minimal solution is the first commit "`Disallow @@ and @@U usage in desktop files`". The follow-up commits "`dir: Reserve the whole @@ prefix`" and "`dir: Refuse to export .desktop files with suspicious uses of @@ tokens`" are recommended, but not strictly required. As a workaround, avoid installing Flatpak apps from untrusted sources, or check the contents of the exported `.desktop` files in `exports/share/applications/*.desktop` (typically `~/.local/share/flatpak/exports/share/applications/*.desktop` and `/var/lib/flatpak/exports/share/applications/*.desktop`) to make sure that literal filenames do not follow `@@` or `@@u`. |
NVD Known Affected Configurations (CPE 2.3)
References
| Reference | Source | Link | Tags |
|---|
| Release Release 1.10.2 · flatpak/flatpak · GitHub |
MISC |
github.com |
Release Notes, Third Party Advisory |
| Disallow @@ and @@u magic tokens in desktop files by smcv · Pull Request #4156 · flatpak/flatpak · GitHub |
MISC |
github.com |
Patch, Third Party Advisory |
| dir: Reserve the whole @@ prefix · flatpak/flatpak@eb7946b · GitHub |
MISC |
github.com |
Patch, Third Party Advisory |
| Disallow @@ and @@u usage in desktop files · flatpak/flatpak@8279c58 · GitHub |
MISC |
github.com |
Patch, Third Party Advisory |
| [SECURITY] Fedora 34 Update: flatpak-1.10.2-1.fc34 - package-announce - Fedora Mailing-Lists |
|
lists.fedoraproject.org |
|
| [SECURITY] Fedora 33 Update: flatpak-1.10.2-1.fc33 - package-announce - Fedora Mailing-Lists |
FEDORA |
lists.fedoraproject.org |
|
| Debian -- Security Information -- DSA-4868-1 flatpak |
DEBIAN |
www.debian.org |
Third Party Advisory |
| Flatpak: Multiple Vulnerabilities (GLSA 202312-12) — Gentoo security |
|
security.gentoo.org |
|
| [SECURITY] Fedora 33 Update: flatpak-1.10.2-1.fc33 - package-announce - Fedora Mailing-Lists |
|
lists.fedoraproject.org |
|
| Sandbox escape via special tokens in .desktop file (flatpak#4146) · Advisory · flatpak/flatpak · GitHub |
CONFIRM |
github.com |
Third Party Advisory |
| dir: Refuse to export .desktop files with suspicious uses of @@ tokens · flatpak/flatpak@a7401e6 · GitHub |
MISC |
github.com |
Patch, Third Party Advisory |
| [SECURITY] Fedora 34 Update: flatpak-1.10.2-1.fc34 - 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
- 159127 Oracle Enterprise Linux Security Update for flatpak (ELSA-2021-1002)
- 159140 Oracle Enterprise Linux Security Update for flatpak (ELSA-2021-1068)
- 178523 Debian Security Update for flatpak (DSA 4868-1)
- 180371 Debian Security Update for flatpak (CVE-2021-21381)
- 198369 Ubuntu Security Notification for Flatpak vulnerability (USN-4951-1)
- 239186 Red Hat Update for flatpak (RHSA-2021:1002)
- 239205 Red Hat Update for flatpak (RHSA-2021:1074)
- 239206 Red Hat Update for flatpak (RHSA-2021:1073)
- 239210 Red Hat Update for flatpak (RHSA-2021:1068)
- 257101 CentOS Security Update for flatpak (CESA-2021:1002)
- 281511 Fedora Security Update for flatpak (FEDORA-2021-26ad138ffa)
- 281512 Fedora Security Update for flatpak (FEDORA-2021-fe7decc595)
- 352263 Amazon Linux Security Advisory for flatpak: ALAS2-2021-1625
- 377061 Alibaba Cloud Linux Security Update for flatpak (ALINUX2-SA-2021:0016)
- 377100 Alibaba Cloud Linux Security Update for flatpak (ALINUX3-SA-2021:0023)
- 670702 EulerOS Security Update for flatpak (EulerOS-SA-2021-2460)
- 670907 EulerOS Security Update for flatpak (EulerOS-SA-2021-2460)
- 710812 Gentoo Linux Flatpak Multiple Vulnerabilities (GLSA 202312-12)
- 752538 SUSE Enterprise Linux Security Update for flatpak (SUSE-SU-2022:2990-1)
- 940181 AlmaLinux Security Update for flatpak (ALSA-2021:1068)