CVE-2021-21381Sandbox escape via special tokens in .desktop file
- 7.1HighCVSS base score
- 1.5%Exploitation in 30 daysEPSS · top 24% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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`.
Timeline
ID reserved
By GitHub_M
- 3 months later
· 3 months later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N |
| NVDNVD · Modified | 3.1 | High8.2 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
- EPSS (exploitation in 30 days)
- 1.5% · top 24% of all CVEs (19 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.1.
Affected products
References
References10
- https://github.com/flatpak/flatpak/security/advisories/GHSA-xgh4-387p-hqpp (opens in a new tab)x_transferred
- https://github.com/flatpak/flatpak/pull/4156 (opens in a new tab)x_transferred
- https://github.com/flatpak/flatpak/commit/8279c5818425b6812523e3805bbe242fb6a5d961 (opens in a new tab)x_transferred
- https://github.com/flatpak/flatpak/commit/a7401e638bf0c03102039e216ab1081922f140ae (opens in a new tab)x_transferred
- https://github.com/flatpak/flatpak/commit/eb7946bb6248923d8c90fe9b84425fef97ae580d (opens in a new tab)x_transferred
- https://github.com/flatpak/flatpak/releases/tag/1.10.2 (opens in a new tab)x_transferred
- DSA-4868 (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-26ad138ffa (opens in a new tab)vendor-advisoryx_transferred
- FEDORA-2021-fe7decc595 (opens in a new tab)vendor-advisoryx_transferred
- GLSA-202312-12 (opens in a new tab)vendor-advisoryx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-8687 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-21381)Record last updated .