Skip to content
OpenAdvisories
High · 7.7 CVE-2022-21682 EUVD-2022-26892

flatpak-builder can access files outside the build directory.

Published Jan 13, 2022 · Updated Aug 3, 2024 · Assigned by GitHub_M

Description

Flatpak is a Linux application sandboxing and distribution framework. A path traversal vulnerability affects versions of Flatpak prior to 1.12.3 and 1.10.6. flatpak-builder applies `finish-args` last in the build. At this point the build directory will have the full access that is specified in the manifest, so running `flatpak build` against it will gain those permissions. Normally this will not be done, so this is not problem. However, if `--mirror-screenshots-url` is specified, then flatpak-builder will launch `flatpak build --nofilesystem=host appstream-utils mirror-screenshots` after finalization, which can lead to issues even with the `--nofilesystem=host` protection. In normal use, the only issue is that these empty directories can be created wherever the user has write permissions. However, a malicious application could replace the `appstream-util` binary and potentially do something more hostile. This has been resolved in Flatpak 1.12.3 and 1.10.6 by changing the behaviour of `--nofilesystem=home` and `--nofilesystem=host`.

Affected products

VendorProductAffectedFixed
flatpak flatpak >= 1.11.0, < 1.12.3, < 1.10.6 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 flatpak 1.12.3-1 —
Debian 13 flatpak 1.12.3-1 —
Debian 12 flatpak 1.12.3-1 —
Debian 11 flatpak 1.10.7-0+deb11u1 DSA-5049-1
ReleasePackageFixed inAdvisory
Ubuntu Pro 22.04 LTS flatpak No fix yet —
Ubuntu Pro 20.04 LTS flatpak No fix yet —
Ubuntu Pro 18.04 LTS flatpak No fix yet —
ReleasePackageFixed inAdvisory
RHEL 8 flatpak-builder 1.0.14-2.el8 RHSA-2022:7458

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 flatpak-builder 1.0.14-2.el8 ALSA-2022:7458

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 flatpak-builder 1.0.14-2.el8 RLSA-2022:7458
ReleasePackageFixed inAdvisory
SLES 15 SP3 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLES 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLE Real Time 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SLE HPC 15 SP2 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Manager Server 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Manager Retail Branch Server 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Manager Proxy 4.1 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
SUSE Enterprise Storage 7 flatpak 1.10.7-4.12.1 SUSE-SU-2022:0712-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed flatpak 1.12.4-1.1 openSUSE-SU-2024:11756-1
openSUSE Tumbleweed flatpak-builder 1.2.2-1.1 openSUSE-SU-2024:11755-1
openSUSE Leap 15.3 flatpak 1.10.7-4.12.1 openSUSE-SU-2022:0712-1
ReleasePackageFixed inAdvisory
Alpine v3.24 flatpak 1.12.5-r0 —
Alpine v3.24 flatpak-builder 1.2.2-r0 —
Alpine v3.23 flatpak 1.12.5-r0 —
Alpine v3.23 flatpak-builder 1.2.2-r0 —
Alpine v3.22 flatpak 1.12.5-r0 —
Alpine v3.22 flatpak-builder 1.2.2-r0 —
Alpine v3.21 flatpak 1.12.5-r0 —
Alpine v3.21 flatpak-builder 1.2.2-r0 —
Alpine v3.20 flatpak 1.12.5-r0 —
Alpine v3.20 flatpak-builder 1.2.2-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 flatpak 1.12.5-r0 —
Alpine v3.19 flatpak-builder 1.2.2-r0 —
Alpine v3.18 flatpak 1.12.5-r0 —
Alpine v3.18 flatpak-builder 1.2.2-r0 —
Alpine v3.17 flatpak 1.12.5-r0 —
Alpine v3.17 flatpak-builder 1.2.2-r0 —
Alpine v3.16 flatpak 1.12.5-r0 —
Alpine v3.16 flatpak-builder 1.2.2-r0 —
Alpine v3.15 flatpak 1.12.5-r0 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 flatpak-builder 1.0.14-2.el8 ELSA-2022-7458

Advisories 10

References