Improper Neutralization of Special Elements in Output Used by a Downstream Component in Flatpak - CVE-2021-21381
Published: March 14, 2021
Vulnerability details
The vulnerability allows a remote attacker to bypass implemented security restrictions.
The vulnerability exists due to improper input validation within the "file forwarding" feature. 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.
Affected software
Gentoo Linux
Arch Linux
SUSE CaaS Platform
SUSE Enterprise Storage
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for Scientific Computing
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Server
CentOS
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux Server - TUS
SUSE Linux Enterprise Server for SAP
SUSE Linux Enterprise Server
SUSE Linux Enterprise High Performance Computing
Ubuntu
openEuler
Fedora
flatpak (Red Hat package)
flatpak (Debian package)
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
flatpak-help
flatpak-devel
flatpak-debugsource
flatpak-debuginfo
flatpak
libflatpak0 (Ubuntu package)
flatpak (Ubuntu package)
typelib-1_0-Flatpak-1_0
libflatpak0-debuginfo
libflatpak0
flatpak-zsh-completion
sys-apps/flatpak
How to mitigate CVE-2021-21381
flatpak (Red Hat package) - addressed in versions 1.0.9-4.el8_1, 1.0.9-11.el7_9, 1.6.2-5.el8_2, 1.6.2-6.el8_3
flatpak (Debian package) - update to 1.2.5-0+deb10u4
flatpak-help - update to 1.0.3-5
flatpak-devel - update to 1.0.3-5
flatpak-debugsource - update to 1.0.3-5
flatpak-debuginfo - update to 1.0.3-5
flatpak - update to 1.0.3-5
libflatpak0 (Ubuntu package) - addressed in versions 1.0.9-0ubuntu0.3, 1.6.5-0ubuntu0.3, 1.8.2-1ubuntu0.2
flatpak (Ubuntu package) - addressed in versions 1.0.9-0ubuntu0.3, 1.6.5-0ubuntu0.3, 1.8.2-1ubuntu0.2
flatpak-debugsource - update to 1.2.3-150100.4.5.2
typelib-1_0-Flatpak-1_0 - update to 1.2.3-150100.4.5.2
libflatpak0-debuginfo - update to 1.2.3-150100.4.5.2
libflatpak0 - update to 1.2.3-150100.4.5.2
flatpak-zsh-completion - update to 1.2.3-150100.4.5.2
flatpak-devel - update to 1.2.3-150100.4.5.2
flatpak-debuginfo - update to 1.2.3-150100.4.5.2
flatpak - update to 1.2.3-150100.4.5.2
flatpak - addressed in versions 1.10.2-1.fc33, 1.10.2-1.fc34
sys-apps/flatpak - update to 1.14.4
External References
- https://github.com/flatpak/flatpak/commit/8279c5818425b6812523e3805bbe242fb6a5d961
- https://github.com/flatpak/flatpak/commit/a7401e638bf0c03102039e216ab1081922f140ae
- https://github.com/flatpak/flatpak/commit/eb7946bb6248923d8c90fe9b84425fef97ae580d
- https://github.com/flatpak/flatpak/pull/4156
- https://github.com/flatpak/flatpak/releases/tag/1.10.2
- https://github.com/flatpak/flatpak/security/advisories/GHSA-xgh4-387p-hqpp
- https://www.debian.org/security/2021/dsa-4868
Related Security Bulletins
- Multiple vulnerabilities in flatpak
- Arch Linux update for flatpak
- Debian update for flatpak
- Red Hat Enterprise Linux 7 update for flatpak
- Red Hat Enterprise Linux 8 update for flatpak
- Red Hat Enterprise Linux 8.2 update for flatpak
- Red Hat Enterprise Linux 8.1 update for flatpak
- CentOS 7 update for flatpak
- Ubuntu update for flatpak
- SUSE update for flatpak
- Gentoo update for Flatpak
- openEuler 20.03 LTS SP1 update for flatpak
- Fedora 34 update for flatpak
- Fedora 33 update for flatpak