CVE-2021-21261: Flatpak sandbox escape via spawn portal
Noroxi assessment
Priority: Monitor (action score 35/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: 0.59% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: flatpak (Alpine:v3.13) 1.10.1-r0; flatpak (Debian:10) 1.2.5-0+deb10u2; flatpak (Debian:12) 1.8.5-1.
Low priority for now. Upgrade to flatpak (Alpine:v3.13) 1.10.1-r0; flatpak (Debian:10) 1.2.5-0+deb10u2; flatpak (Debian:12) 1.8.5-1 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. 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.
- Published
- Jan 14, 2021
- Updated
- Jun 16, 2026
- EPSS
- 0.5% · 49th percentile
- CWE
- CWE-74
Report tools
Action score
35
Low priority for now.
- CVSS
- 35 / 40 · 8.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.5%
CNA vs NVD score
- NVD
- 8.8
- CNA · GitHub_M
- 7.3
- 1.5 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/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 |
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.11.4, < 1.8.5, >= 1.9.0, < 1.10.0affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- flatpak flatpak0.11.4 and later · before 1.8.5
- flatpak flatpak1.9.1 and later · before 1.10.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.13 | flatpak | from 0.11.4 · before 1.10.1-r0 | 1.10.1-r0 |
| Debian:10 | flatpak | before 1.2.5-0+deb10u2 | 1.2.5-0+deb10u2 |
| Debian:12 | flatpak | before 1.8.5-1 | 1.8.5-1 |
| openSUSE:Leap 15.2 | flatpak | before 1.10.2-lp152.3.6.1 | 1.10.2-lp152.3.6.1 |
| openSUSE:Leap 15.2 | libostree | before 2020.8-lp152.2.3.1 | 2020.8-lp152.2.3.1 |
| openSUSE:Leap 15.2 | xdg-desktop-portal | before 1.8.0-lp152.4.3.1 | 1.8.0-lp152.4.3.1 |
| openSUSE:Leap 15.2 | xdg-desktop-portal-gtk | before 1.8.0-lp152.2.3.1 | 1.8.0-lp152.2.3.1 |
| openSUSE:Tumbleweed | flatpak | before 1.11.3-1.2 | 1.11.3-1.2 |
| Red Hat:enterprise_linux:7::client | flatpak | before 0:1.0.9-10.el7_9 | 0:1.0.9-10.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-builder | before 0:1.0.0-10.el7_9 | 0:1.0.0-10.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-debuginfo | before 0:1.0.9-10.el7_9 | 0:1.0.9-10.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-devel | before 0:1.0.9-10.el7_9 | 0:1.0.9-10.el7_9 |
| Red Hat:enterprise_linux:7::client | flatpak-libs | before 0:1.0.9-10.el7_9 | 0:1.0.9-10.el7_9 |
| Red Hat:enterprise_linux:8::appstream | flatpak | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-debuginfo | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-debugsource | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-libs | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-libs-debuginfo | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-selinux | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-session-helper | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-session-helper-debuginfo | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:enterprise_linux:8::appstream | flatpak-tests-debuginfo | before 0:1.6.2-5.el8_3 | 0:1.6.2-5.el8_3 |
| Red Hat:rhel_eus:8.1::appstream | flatpak | before 0:1.0.9-3.el8_1 | 0:1.0.9-3.el8_1 |
| Red Hat:rhel_eus:8.1::appstream | flatpak-debuginfo | before 0:1.0.9-3.el8_1 | 0:1.0.9-3.el8_1 |
+18
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-2018-6560Feb 2, 2018 · In dbus-proxy/flatpak-proxy.c in Flatpak before 0.8.9, and 0.9.x and 0.10.x before 0.10.3, crafted D-Bus messages to the host can be used…35Monitor
- ← 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
- Later →CVE-2021-21381Mar 11, 2021 · Sandbox escape via special tokens in .desktop file32Monitor
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 |
|---|---|---|
| alpine:flatpak | 1.10.1-r0 · Alpine:v3.13 | Package registry (OSV) |
| debian:flatpak | 1.8.5-1 · Debian:12 | Package registry (OSV) |
| opensuse:flatpak | 1.10.2-lp152.3.6.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:libostree | 2020.8-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:xdg-desktop-portal | 1.8.0-lp152.4.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| opensuse:xdg-desktop-portal-gtk | 1.8.0-lp152.2.3.1 · openSUSE:Leap 15.2 | Package registry (OSV) |
| red hat:flatpak | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-builder | 0:1.0.0-10.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-debuginfo | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-debugsource | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-devel | 0:1.0.9-10.el7_9 · Red Hat:enterprise_linux:7::client | Package registry (OSV) |
| red hat:flatpak-libs | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-libs-debuginfo | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-selinux | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-session-helper | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-session-helper-debuginfo | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:flatpak-tests-debuginfo | 0:1.6.2-5.el8_3 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| suse:flatpak | 1.10.2-4.6.1 · SUSE:Linux Enterprise Module for Desktop Applications 15 SP2 | Package registry (OSV) |
| suse:libostree | 2020.8-3.3.2 · SUSE:Linux Enterprise Module for Basesystem 15 SP2 | Package registry (OSV) |
| suse:xdg-desktop-portal | 1.8.0-5.3.2 · SUSE:Linux Enterprise Module for Desktop Applications 15 SP2 | Package registry (OSV) |
| suse:xdg-desktop-portal-gtk | 1.8.0-3.3.1 · SUSE:Linux Enterprise Module for Desktop Applications 15 SP2 | 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.
- A low-privileged account is enough.
- No user action is required.
- 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
- high · the service can be disrupted
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
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:L/UI:N/S:C/C:H/I:H/A:H
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 (7 more)Show less
- github.com/flatpak/flatpak/commit/6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b
- github.com/flatpak/flatpak/commit/aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4
- github.com/flatpak/flatpak/commit/cc1401043c075268ecc652eac557ef8076b5eaba
- github.com/flatpak/flatpak/releases/tag/1.8.5
- github.com/flatpak/flatpak/security/advisories/GHSA-4ppf-fxf6-vxg2
- security.gentoo.org/glsa/202101-21
- www.debian.org/security/2021/dsa-4830
Vendor advisories and official records. Exploit/PoC links are deliberately left out.