CVE-2021-21261

Summary

CVECVE-2021-21261
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2021-01-14 20:15:00 UTC
Updated2021-01-27 19:34:00 UTC
DescriptionFlatpak 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.

Risk And Classification

Problem Types: CWE-74

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Debian Debian Linux 10.0 All All All
Operating System Debian Debian Linux 10.0 All All All
Application Flatpak Flatpak All All All All
Application Flatpak Flatpak All All All All

References

ReferenceSourceLinkTags
Debian -- Security Information -- DSA-4830-1 flatpak DEBIAN www.debian.org Third Party Advisory
portal: Convert --env in extra-args into --env-fd · flatpak/flatpak@aeb6a7a · GitHub MISC github.com Patch, Third Party Advisory
portal: Do not use caller-supplied variables in environment · flatpak/flatpak@cc14010 · GitHub MISC github.com Third Party Advisory
context: Add --env-fd option · flatpak/flatpak@6e5ae7a · GitHub MISC github.com Patch, Third Party Advisory
Release Release 1.8.5 · flatpak/flatpak · GitHub MISC github.com Third Party Advisory
Flatpak: Sandbox escape (GLSA 202101-21) — Gentoo security GENTOO security.gentoo.org Third Party Advisory
CVE-2021-21261: Flatpak sandbox escape via spawn portal · Advisory · flatpak/flatpak · GitHub CONFIRM github.com Third Party Advisory
run: Convert all environment variables into bwrap arguments · flatpak/flatpak@6d1773d · GitHub MISC github.com Patch, Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 174877 SUSE Enterprise Linux Security Update for flatpak, libostree, xdg-desktop-portal, xdg-desktop-portal-gtk (SUSE-SU-2021:1094-1)
  • 180296 Debian Security Update for flatpak (CVE-2021-21261)
  • 376873 Alibaba Cloud Linux Security Update for flatpak (ALINUX2-SA-2021:0009)
  • 377160 Alibaba Cloud Linux Security Update for flatpak (ALINUX3-SA-2021:0001)
  • 501560 Alpine Linux Security Update for flatpak
  • 670536 EulerOS Security Update for flatpak (EulerOS-SA-2021-2294)
  • 750278 OpenSUSE Security Update for flatpak, libostree, xdg-desktop-portal, xdg-desktop-portal-gtk (openSUSE-SU-2021:0520-1)
  • 752538 SUSE Enterprise Linux Security Update for flatpak (SUSE-SU-2022:2990-1)
  • 752593 SUSE Enterprise Linux Security Update for flatpak (SUSE-SU-2022:3284-1)
  • 940074 AlmaLinux Security Update for flatpak (ALSA-2021:0304)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report