CVE-2021-21381

HIGH EPSS 71.9%
Published Mar 11, 20215y ago · Modified Jun 17, 20262w ago
8.2 CVSS 3.1
High
Find Similar
Published Mar 11, 2021 5y ago
Last Modified Jun 17, 2026 2w ago

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`.

CVSS Details

Base Score
8.2
Exploitability
1.8
Impact
5.8
Vector string
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
Attack Vector Local
Attack Complexity Low
Privileges Required None
User Interaction Required
Scope Changed
Confidentiality High
Integrity High
Availability None

Threat Intelligence

EPSS Exploit Probability
71.9% percentile
Exploit & Patch Status
No Known Exploit
Patch Available

Weaknesses 1

CWE-74

Affected Products 4

VendorProductVersionRange
flatpakflatpak*≥0.9.4  –  <1.10.2
debiandebian_linux10.0any
fedoraprojectfedora33any
fedoraprojectfedora34any

References 10

  • github.com https://github.com/flatpak/flatpak/commit/8279c5818425b6812523e3805bbe242fb6a5d961
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/commit/a7401e638bf0c03102039e216ab1081922f140ae
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/commit/eb7946bb6248923d8c90fe9b84425fef97ae580d
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/pull/4156
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/releases/tag/1.10.2
    Release NotesThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/security/advisories/GHSA-xgh4-387p-hqpp
    Third Party Advisory
  • lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MXXLXC2DPJ45HSMTI5MZYHMYEGQN6AA/
  • lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WXNVFOIB6ZP4DGOVKAM25T6OIEP3YLGV/
  • security.gentoo.org https://security.gentoo.org/glsa/202312-12
  • debian.org https://www.debian.org/security/2021/dsa-4868
    Third Party Advisory

Remediation

  • github.com https://github.com/flatpak/flatpak/commit/8279c5818425b6812523e3805bbe242fb6a5d961
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/commit/a7401e638bf0c03102039e216ab1081922f140ae
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/commit/eb7946bb6248923d8c90fe9b84425fef97ae580d
    PatchThird Party Advisory
  • github.com https://github.com/flatpak/flatpak/pull/4156
    PatchThird Party Advisory