CVE-2021-21381: Sandbox escape via special tokens in .desktop file
Noroxi assessment
Priority: Monitor (action score 32/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1.5% (FIRST EPSS); higher than 75.4% of all records.
- Someone with local access to the system can trigger it. No account or password is required. A user must open a link or visit a page. No special conditions are required; it is repeatable.
- Fixed version: flatpak flatpak 1.10.2.
Low priority for now. Upgrade to flatpak flatpak 1.10.2 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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`.
- Published
- Mar 11, 2021
- Updated
- Jun 16, 2026
- EPSS
- 1.5% · 75th percentile
- CWE
- CWE-74
Report tools
Action score
32
Low priority for now.
- CVSS
- 32 / 40 · 8.2 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 1.5%
CNA vs NVD score
- NVD
- 8.2
- CNA · GitHub_M
- 7.1
- 1.1 point gap
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| flatpak | flatpak | cpe:2.3:a:flatpak:flatpak |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
flatpak flatpak
- >= 0.9.4, < 1.10.2affected
Affected versions · NVD (4)
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- fedoraproject fedora33
- fedoraproject fedora34
- flatpak flatpak0.9.4 and later · before 1.10.2
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:10 | flatpak | before 1.2.5-0+deb10u4 | 1.2.5-0+deb10u4 |
| Debian:12 | flatpak | before 1.10.1-4 | 1.10.1-4 |
| Red Hat:enterprise_linux:7::client | flatpak | before 0:1.0.9-11.el7_9 | 0:1.0.9-11.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-builder | before 0:1.0.0-11.el7_9 | 0:1.0.0-11.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-debuginfo | before 0:1.0.9-11.el7_9 | 0:1.0.9-11.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-devel | before 0:1.0.9-11.el7_9 | 0:1.0.9-11.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-libs | before 0:1.0.9-11.el7_9 | 0:1.0.9-11.el7_9 |
| Red Hat:enterprise_linux:8::appstream | flatpak | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-debuginfo | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-debugsource | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-libs | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-libs-debuginfo | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-selinux | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-session-helper | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-session-helper-debuginfo | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-tests-debuginfo | before 0:1.6.2-6.el8_3 | 0:1.6.2-6.el8_3 |
| Red Hat:rhel_eus:8.1::appstream | flatpak | before 0:1.0.9-4.el8_1 | 0:1.0.9-4.el8_1 |
| Red Hat:rhel_eus:8.1::appstream | flatpak-debuginfo | before 0:1.0.9-4.el8_1 | 0:1.0.9-4.el8_1 |
| Red Hat:rhel_eus:8.1::appstream | flatpak-debugsource | before 0:1.0.9-4.el8_1 | 0:1.0.9-4.el8_1 |
| Red Hat:rhel_eus:8.1::appstream | flatpak-libs | before 0:1.0.9-4.el8_1 | 0:1.0.9-4.el8_1 |
| Red Hat:rhel_eus:8.1::appstream | flatpak-libs-debuginfo | before 0:1.0.9-4.el8_1 | 0:1.0.9-4.el8_1 |
| Red Hat:rhel_eus:8.2::appstream | flatpak | before 0:1.6.2-5.el8_2 | 0:1.6.2-5.el8_2 |
| Red Hat:rhel_eus:8.2::appstream | flatpak-debuginfo | before 0:1.6.2-5.el8_2 | 0:1.6.2-5.el8_2 |
| Red Hat:rhel_eus:8.2::appstream | flatpak-debugsource | before 0:1.6.2-5.el8_2 | 0:1.6.2-5.el8_2 |
+7
Same product
flatpak: all recordsOther highest-scoring records for the same primary product.
- CVE-2024-42472Flatpak may allow access to files outside sandbox for certain apps40Plan
- CVE-2026-34078Flatpak has a complete sandbox escape leading to host file access and code execution in the host context38Monitor
- CVE-2019-10063Flatpak before 1.0.8, 1.1.x and 1.2.x before 1.2.4, and 1.3.x before 1.3.1 allows a sandbox bypass.37Monitor
Published before and after this one in the same product
- ← EarlierCVE-2019-8308Feb 12, 2019 · Flatpak before 1.0.7, and 1.1.x and 1.2.x before 1.2.3, exposes /proc in the apply_extra script sandbox, which allows attackers to modify a…32Monitor
- ← EarlierCVE-2021-21261Jan 14, 2021 · Flatpak sandbox escape via spawn portal35Monitor
- Later →CVE-2021-41133Oct 8, 2021 · Sandbox bypass via recent VFS-manipulating syscalls31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| flatpak flatpak | 1.10.2 · description | Vendor (CNA) |
| debian:flatpak | 1.10.1-4 · Debian:12 | Package registry (OSV) |
| red hat:flatpak | 0:1.0.9-11.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-builder | 0:1.0.0-11.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-debuginfo | 0:1.0.9-11.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-debugsource | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-devel | 0:1.0.9-11.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-libs | 0:1.0.9-11.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-libs-debuginfo | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-selinux | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-session-helper | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-session-helper-debuginfo | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-tests-debuginfo | 0:1.6.2-6.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| suse:flatpak | 1.2.3-150100.4.5.2 · SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOS | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- A user must open a link or visit a page.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- none
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- None
Weakness class (CWE)
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Server Side Include (SSI) InjectionCAPEC-101likelihood: High · High
- HTTP Request SplittingCAPEC-105likelihood: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Double EncodingCAPEC-120likelihood: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
- Format String InjectionCAPEC-135likelihood: High · High
- Client-side Injection-induced Buffer OverflowCAPEC-14likelihood: Medium · High
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (9 more)Show less
- github.com/flatpak/flatpak/commit/a7401e638bf0c03102039e216ab1081922f140ae
- github.com/flatpak/flatpak/commit/eb7946bb6248923d8c90fe9b84425fef97ae580d
- github.com/flatpak/flatpak/pull/4156
- github.com/flatpak/flatpak/releases/tag/1.10.2
- github.com/flatpak/flatpak/security/advisories/GHSA-xgh4-387p-hqpp
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MXXLXC2DPJ45HSMTI5MZYHMYEGQN6AA/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WXNVFOIB6ZP4DGOVKAM25T6OIEP3YLGV/
- security.gentoo.org/glsa/202312-12
- www.debian.org/security/2021/dsa-4868
Vendor advisories and official records. Exploit/PoC links are deliberately left out.