CVE-2021-21261
NixOS vulnerability analysis and mitigation

Overview

CVE-2021-21261 is a high-severity vulnerability discovered in Flatpak, a Linux application sandboxing and distribution framework. The vulnerability was discovered by Simon McVittie and affects versions >= 0.11.4 and < 1.10.0, except for 1.8.x >= 1.8.5. The issue was disclosed on January 14, 2021, and fixed in versions 1.10.0 and 1.8.5 (GitHub Advisory).

Technical details

The vulnerability exists in the flatpak-portal service (also known by its D-Bus service name org.freedesktop.portal.Flatpak) which allows apps in a Flatpak sandbox to launch their own subprocesses in a new sandbox instance. The bug allows the portal service to pass caller-specified environment variables to non-sandboxed processes on the host system, particularly to the flatpak run command used to launch new sandbox instances (GitHub Advisory).

Impact

A malicious or compromised Flatpak app could exploit this vulnerability to set environment variables that are trusted by the flatpak run command, allowing the execution of arbitrary code outside the sandbox. This effectively enables a sandbox escape that could lead to code execution with the privileges of the host process (Gentoo Security).

Exploitability

The vulnerability can be exploited remotely by enticing a user to open a specially crafted Flatpak app. This could result in arbitrary code execution with the privileges of the process or a Denial of Service condition (Gentoo Security).

Mitigation and workarounds

While the vulnerability can be mitigated by preventing the flatpak-portal service from starting, this workaround will prevent many Flatpak apps from working correctly. The recommended solution is to upgrade to Flatpak version 1.10.0 or later, or version 1.8.5 or later in the 1.8.x series. The fixes were implemented through multiple commits (6d1773d, 6e5ae7a, aeb6a7a, cc14010) (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-18713HIGH8.8
  • NixOS logoNixOS
  • i
NoNoAug 12, 2026
CVE-2026-18669HIGH8.8
  • NixOS logoNixOS
  • i
NoNoAug 12, 2026
CVE-2026-18235HIGH8.3
  • NixOS logoNixOS
  • i
NoNoAug 12, 2026
CVE-2026-17420MEDIUM6.3
  • NixOS logoNixOS
  • i
NoNoAug 12, 2026
CVE-2026-18250MEDIUM5
  • NixOS logoNixOS
  • i
NoNoAug 12, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management