CVE-2021-21381

Sandbox escape via special tokens in .desktop file

HIGH
8.2
CVSS Score
Published: March 11, 2021 at 12:00 AM UTC
Updated: June 17, 2026 at 03:35 AM UTC
3 products affected across 3 vendorsDebian LinuxFedoraFlatpak

Using flatpak by flatpak?

Get instant alerts when new vulnerabilities affect flatpak - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.2
Exploit prediction
EPSS 2%

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

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.10.20.9.4 ≤ v < 1.10.2
Affected range stops below 1.10.2, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-74

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card