cve.bz

CVE-2021-21381 Injection

8.2 highEPSS 1.5%Fix available

High (8.2). EPSS 1.5% estimated probability of exploitation activity in the next 30 days.

On this page
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`.

Severity

CVSS 3.1

8.2 high
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N
EPSS
1.5% (unchanged from 1.5% a week ago; 1.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 76th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component (Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2021-21381 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21381?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21381?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2021-21381 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
flatpak:flatpakfrom 0.9.4 before 1.10.2
debian:debian_linux10.0
fedoraproject:fedora33
fedoraproject:fedora34

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10flatpak1.2.5-0+deb10u4DSA-4868-1
Debian12, 13, 14flatpak1.10.1-4DEBIAN-CVE-2021-21381
Ubuntu18.04:LTSflatpak1.0.9-0ubuntu0.3UBUNTU-CVE-2021-21381 USN-4951-1
Ubuntu20.04:LTSflatpak1.6.5-0ubuntu0.3UBUNTU-CVE-2021-21381 USN-4951-1
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 moreflatpak, flatpak-libs, flatpak-devel and 1 more0:1.0.9-11.el7_9RHSA-2021:1002
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 moreflatpak-builder0:1.0.0-11.el7_9RHSA-2021:1002
Red Hatenterprise_linux:8::appstreamflatpak, flatpak-libs, flatpak-selinux and 6 more0:1.6.2-6.el8_3RHSA-2021:1068
Red Hatrhel_eus:8.1::appstreamflatpak, flatpak-libs, flatpak-debuginfo and 2 more0:1.0.9-4.el8_1RHSA-2021:1074
Red Hatrhel_eus:8.2::appstreamflatpak, flatpak-libs, flatpak-selinux and 6 more0:1.6.2-5.el8_2RHSA-2021:1073
SUSEEnterprise Storage 6, Linux Enterprise High Performance Computing 15 SP1-ESPOS, Linux Enterprise High Performance Computing 15 SP1-LTSS and 3 moreflatpak1.2.3-150100.4.5.2SUSE-SU-2022:2990-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This is essentially a sandbox escape flaw and needs a malicious app publisher to execute the exploit.

Red Hat's mitigation

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.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7flatpak-0:1.0.9-11.el7_9Fixed 2021-03-29RHSA-2021:1002
Red Hat Enterprise Linux 8flatpak-0:1.6.2-6.el8_3Fixed 2021-04-06RHSA-2021:1068
Red Hat Enterprise Linux 8.1 Extended Update Supportflatpak-0:1.0.9-4.el8_1Fixed 2021-04-06RHSA-2021:1074
Red Hat Enterprise Linux 8.2 Extended Update Supportflatpak-0:1.6.2-5.el8_2Fixed 2021-04-06RHSA-2021:1073
Red Hat Enterprise Linux 9flatpakNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2021-21381.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-74 (37).

References

Check your stackJSON