Improper Neutralization of Special Elements in Output Used by a Downstream Component in Flatpak - CVE-2021-21381

 

Improper Neutralization of Special Elements in Output Used by a Downstream Component in Flatpak - CVE-2021-21381

Published: March 14, 2021


Vulnerability identifier: #VU51443
CSH Severity: Medium
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-21381
CWE-ID: CWE-74
Exploitation vector: Remote access
Exploit availability: No public exploit available

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

Flatpak
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

Install updates from vendor's website.

Flatpak - update to 1.10.2
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

Related Security Bulletins