Vulnerability · Published Oct 8, 2021 · Assigned by GitHub_M
CVE-2021-41133Sandbox bypass via recent VFS-manipulating syscalls
High 8.8
In plain English
A high-severity improper input validation in flatpak from flatpak. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 38% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In versions prior to 1.10.4 and 1.12.0, Flatpak apps with direct access to AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can trick portals and other host-OS services into treating the Flatpak app as though it was an ordinary, non-sandboxed host-OS process. They can do this by manipulating the VFS using recent mount-related syscalls that are not blocked by Flatpak's denylist seccomp filter, in order to substitute a crafted `/.flatpak-info` or make that file disappear entirely. Flatpak apps that act as clients for AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can escalate the privileges that the corresponding services will believe the Flatpak app has. Note that protocols that operate entirely over the D-Bus session bus (user bus), system bus or accessibility bus are not affected by this. This is due to the use of a proxy process `xdg-dbus-proxy`, whose VFS cannot be manipulated by the Flatpak app, when interacting with these buses. Patches exist for versions 1.10.4 and 1.12.0, and as of time of publication, a patch for version 1.8.2 is being planned. There are no workarounds aside from upgrading to a patched version.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | flatpak | 1.8.5-5.el8_5 | ALEA-2021:4539 |
| AlmaLinux:8 | flatpak | 1.8.5-4.el8_4 | ALSA-2021:4042 |
| AlmaLinux:8 | flatpak-devel | 1.8.5-5.el8_5 | ALEA-2021:4539 |
| AlmaLinux:8 | flatpak-libs | 1.8.5-4.el8_4 | ALSA-2021:4042 |
| AlmaLinux:8 | flatpak-libs | 1.8.5-5.el8_5 | ALEA-2021:4539 |
| AlmaLinux:8 | flatpak-selinux | 1.8.5-5.el8_5 | ALEA-2021:4539 |
| AlmaLinux:8 | flatpak-selinux | 1.8.5-4.el8_4 | ALSA-2021:4042 |
| AlmaLinux:8 | flatpak-session-helper | 1.8.5-4.el8_4 | ALSA-2021:4042 |
| AlmaLinux:8 | flatpak-session-helper | 1.8.5-5.el8_5 | ALEA-2021:4539 |
| Alpine:v3.20 | flatpak | 1.12.2-r0 | ALPINE-CVE-2021-41133 |
| Alpine:v3.21 | flatpak | 1.12.2-r0 | ALPINE-CVE-2021-41133 |
| Alpine:v3.22 | flatpak | 1.12.2-r0 | ALPINE-CVE-2021-41133 |
| Alpine:v3.23 | flatpak | 1.12.2-r0 | ALPINE-CVE-2021-41133 |
| Alpine:v3.24 | flatpak | 1.12.2-r0 | ALPINE-CVE-2021-41133 |
| Debian:12 | flatpak | 1.12.1-1 | DEBIAN-CVE-2021-41133 |
| Debian:13 | flatpak | 1.12.1-1 | DEBIAN-CVE-2021-41133 |
| Debian:14 | flatpak | 1.12.1-1 | DEBIAN-CVE-2021-41133 |
| Rocky Linux:8 | flatpak | 0:1.8.5-4.el8 | RLSA-2021:4042 |
| Rocky Linux:8 | flatpak | 0:1.8.5-4.el8_4 | RLSA-2021:4042 |
Affected products (as reported)
Weakness: CWE-20 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/flatpak/flatpak/security/advisories/GHSA-67h7-w3jq-vh4q
- https://github.com/flatpak/flatpak/commit/1330662f33a55e88bfe18e76de28b7922d91a999
- https://github.com/flatpak/flatpak/commit/26b12484eb8a6219b9e7aa287b298a894b2f34ca
- https://github.com/flatpak/flatpak/commit/462fca2c666e0cd2b60d6d2593a7216a83047aaf
- https://github.com/flatpak/flatpak/commit/4c34815784e9ffda5733225c7d95824f96375e36
- https://github.com/flatpak/flatpak/commit/89ae9fe74c6d445bb1b3a40e568d77cf5de47e48
- https://github.com/flatpak/flatpak/commit/9766ee05b1425db397d2cf23afd24c7f6146a69f
- https://github.com/flatpak/flatpak/commit/a10f52a7565c549612c92b8e736a6698a53db330
- https://github.com/flatpak/flatpak/commit/e26ac7586c392b5eb35ff4609fe232c52523b2cf
- FEDORA-2021-4b201d15e6 vendor-advisory
- DSA-4984 vendor-advisory
- [oss-security] 20211026 WebKitGTK and WPE WebKit Security Advisory WSA-2021-0006 mailing-list
- FEDORA-2021-c5a9c85737 vendor-advisory
- GLSA-202312-12 vendor-advisory