CVE-2021-21381

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`.
Injection
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
7.1 HIGH
LOCAL
LOW
NONE
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N
Base Score
CVSS 3.x
EPSS Score
Percentile: 30%
Affected Products (NVD)
VendorProductVersion
flatpakflatpak
0.9.4 ≤
𝑥
< 1.10.2
debiandebian_linux
10.0
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
flatpak
bookworm
1.14.10-1~deb12u1
fixed
bookworm (security)
1.14.10-1~deb12u1
fixed
bullseye
1.10.8-0+deb11u2
fixed
bullseye (security)
1.10.8-0+deb11u2
fixed
sid
1.14.10-1
fixed
stretch
not-affected
trixie
1.14.10-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
flatpak
bionic
Fixed 1.0.9-0ubuntu0.3
released
focal
Fixed 1.6.5-0ubuntu0.3
released
groovy
Fixed 1.8.2-1ubuntu0.2
released
hirsute
not-affected
trusty
dne
xenial
dne
openSUSE logo
openSUSE / SLES Releases
openSUSE Product
Release
flatpak
suse enterprise server 15 SP1
1.2.3-150100.4.5.2
fixed
flatpak-devel
suse enterprise server 15 SP1
1.2.3-150100.4.5.2
fixed
flatpak-zsh-completion
suse enterprise server 15 SP1
1.2.3-150100.4.5.2
fixed
libflatpak0
suse enterprise server 15 SP1
1.2.3-150100.4.5.2
fixed
typelib-1_0-Flatpak-1_0
suse enterprise server 15 SP1
1.2.3-150100.4.5.2
fixed
Red Hat logo
Red Hat Enterprise Linux Releases
Red Hat Product
Release
flatpak
RHEL 7
0:1.0.9-11.el7_9
fixed
RHEL 8
0:1.6.2-6.el8_3
fixed
RHEL 8.1 E4S
0:1.0.9-4.el8_1
fixed
RHEL 8.1 EUS
0:1.0.9-4.el8_1
fixed
RHEL 8.2 AUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 E4S
0:1.6.2-5.el8_2
fixed
RHEL 8.2 EUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 TUS
0:1.6.2-5.el8_2
fixed
flatpak-builder
RHEL 7
0:1.0.0-11.el7_9
fixed
flatpak-devel
RHEL 7
0:1.0.9-11.el7_9
fixed
flatpak-libs
RHEL 7
0:1.0.9-11.el7_9
fixed
RHEL 8
0:1.6.2-6.el8_3
fixed
RHEL 8.1 E4S
0:1.0.9-4.el8_1
fixed
RHEL 8.1 EUS
0:1.0.9-4.el8_1
fixed
RHEL 8.2 AUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 E4S
0:1.6.2-5.el8_2
fixed
RHEL 8.2 EUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 TUS
0:1.6.2-5.el8_2
fixed
flatpak-selinux
RHEL 8
0:1.6.2-6.el8_3
fixed
RHEL 8.2 AUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 E4S
0:1.6.2-5.el8_2
fixed
RHEL 8.2 EUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 TUS
0:1.6.2-5.el8_2
fixed
flatpak-session-helper
RHEL 8
0:1.6.2-6.el8_3
fixed
RHEL 8.2 AUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 E4S
0:1.6.2-5.el8_2
fixed
RHEL 8.2 EUS
0:1.6.2-5.el8_2
fixed
RHEL 8.2 TUS
0:1.6.2-5.el8_2
fixed
References