cve.bz

CVE-2021-21261 Injection

8.8 highEPSS 0.6%Fix available

High (8.8). EPSS 0.6% 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. A bug was discovered in the `flatpak-portal` service that can allow sandboxed applications to execute arbitrary code on the host system (a sandbox escape). This sandbox-escape bug is present in versions from 0.11.4 and before fixed versions 1.8.5 and 1.10.0. The Flatpak portal D-Bus service (`flatpak-portal`, also known by its D-Bus service name `org.freedesktop.portal.Flatpak`) allows apps in a Flatpak sandbox to launch their own subprocesses in a new sandbox instance, either with the same security settings as the caller or with more restrictive security settings. For example, this is used in Flatpak-packaged web browsers such as Chromium to launch subprocesses that will process untrusted web content, and give those subprocesses a more restrictive sandbox than the browser itself. In vulnerable versions, the Flatpak portal service passes caller-specified environment variables to non-sandboxed processes on the host system, and in particular to the `flatpak run` command that is used to launch the new sandbox instance. A malicious or compromised Flatpak app could set environment variables that are trusted by the `flatpak run` command, and use them to execute arbitrary code that is not in a sandbox. As a workaround, this vulnerability can be mitigated by preventing the `flatpak-portal` service from starting, but that mitigation will prevent many Flatpak apps from working correctly. This is fixed in versions 1.8.5 and 1.10.0.

Severity

CVSS 3.1

8.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS
0.6% (unchanged from 0.6% a week ago; 0.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 49th 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-21261 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2021-21261?via=ask-ai-copy and https://cve.bz/cve/CVE-2021-21261?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-21261 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.11.4 before 1.8.5
flatpak:flatpakfrom 1.9.1 before 1.10.0
debian:debian_linux10.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10flatpak1.2.5-0+deb10u2DSA-4830-1
Debian12, 13, 14flatpak1.8.5-1DEBIAN-CVE-2021-21261
Ubuntu18.04:LTSflatpak1.0.9-0ubuntu0.2UBUNTU-CVE-2021-21261 USN-4721-1
Ubuntu20.04:LTSflatpak1.6.5-0ubuntu0.2UBUNTU-CVE-2021-21261 USN-4721-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-10.el7_9RHSA-2021:0411
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 moreflatpak-builder0:1.0.0-10.el7_9RHSA-2021:0411
Red Hatenterprise_linux:8::appstreamflatpak, flatpak-libs, flatpak-selinux and 6 more0:1.6.2-5.el8_3RHSA-2021:0304
Red Hatrhel_eus:8.1::appstreamflatpak, flatpak-libs, flatpak-debuginfo and 2 more0:1.0.9-3.el8_1RHSA-2021:0306
Red Hatrhel_eus:8.2::appstreamflatpak, flatpak-libs, flatpak-selinux and 6 more0:1.6.2-4.el8_2RHSA-2021:0307
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
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.8.1SUSE-SU-2022:3284-1
SUSELinux Enterprise Module for Basesystem 15 SP2, Linux Enterprise Module for Desktop Applications 15 SP2libostree2020.8-3.3.2SUSE-SU-2021:1094-1
SUSELinux Enterprise Module for Desktop Applications 15 SP2flatpak1.10.2-4.6.1SUSE-SU-2021:1094-1
SUSELinux Enterprise Module for Desktop Applications 15 SP2xdg-desktop-portal1.8.0-5.3.2SUSE-SU-2021:1094-1
SUSELinux Enterprise Module for Desktop Applications 15 SP2xdg-desktop-portal-gtk1.8.0-3.3.1SUSE-SU-2021:1094-1
openSUSELeap 15.2flatpak1.10.2-lp152.3.6.1openSUSE-SU-2021:0520-1
openSUSELeap 15.2libostree2020.8-lp152.2.3.1openSUSE-SU-2021:0520-1
openSUSELeap 15.2xdg-desktop-portal1.8.0-lp152.4.3.1openSUSE-SU-2021:0520-1
openSUSELeap 15.2xdg-desktop-portal-gtk1.8.0-lp152.2.3.1openSUSE-SU-2021:0520-1
openSUSETumbleweedflatpak1.11.3-1.2openSUSE-SU-2024:10762-1
Alpinev3.13, v3.14, v3.15 and 9 moreflatpak1.10.1-r0ALPINE-CVE-2021-21261

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; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

This vulnerability can be mitigated by preventing the flatpak-portal service from starting. Please note that this mitigation may prevent other Flatpak apps from working correctly.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7flatpak-0:1.0.9-10.el7_9Fixed 2021-02-04RHSA-2021:0411
Red Hat Enterprise Linux 8flatpak-0:1.6.2-5.el8_3Fixed 2021-02-01RHSA-2021:0304
Red Hat Enterprise Linux 8.1 Extended Update Supportflatpak-0:1.0.9-3.el8_1Fixed 2021-02-01RHSA-2021:0306
Red Hat Enterprise Linux 8.2 Extended Update Supportflatpak-0:1.6.2-4.el8_2Fixed 2021-02-01RHSA-2021:0307
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-21261.

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