Skip to content
OpenAdvisories
Critical · 10.0 CVE-2024-42472 EUVD-2024-39634

Flatpak may allow access to files outside sandbox for certain apps

Published Aug 15, 2024 · Updated Apr 2, 2025 · Assigned by GitHub_M

Description

Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.14.0 and 1.15.10, a malicious or compromised Flatpak app using persistent directories could access and write files outside of what it would otherwise have access to, which is an attack on integrity and confidentiality.

When `persistent=subdir` is used in the application permissions (represented as `--persist=subdir` in the command-line interface), that means that an application which otherwise doesn't have access to the real user home directory will see an empty home directory with a writeable subdirectory `subdir`. Behind the scenes, this directory is actually a bind mount and the data is stored in the per-application directory as `~/.var/app/$APPID/subdir`. This allows existing apps that are not aware of the per-application directory to still work as intended without general home directory access.

However, the application does have write access to the application directory `~/.var/app/$APPID` where this directory is stored. If the source directory for the `persistent`/`--persist` option is replaced by a symlink, then the next time the application is started, the bind mount will follow the symlink and mount whatever it points to into the sandbox.

Partial protection against this vulnerability can be provided by patching Flatpak using the patches in commits ceec2ffc and 98f79773. However, this leaves a race condition that could be exploited by two instances of a malicious app running in parallel. Closing the race condition requires updating or patching the version of bubblewrap that is used by Flatpak to add the new `--bind-fd` option using the patch and then patching Flatpak to use it. If Flatpak has been configured at build-time with `-Dsystem_bubblewrap=bwrap` (1.15.x) or `--with-system-bubblewrap=bwrap` (1.14.x or older), or a similar option, then the version of bubblewrap that needs to be patched is a system copy that is distributed separately, typically `/usr/bin/bwrap`. This configuration is the one that is typically used in Linux distributions. If Flatpak has been configured at build-time with `-Dsystem_bubblewrap=` (1.15.x) or with `--without-system-bubblewrap` (1.14.x or older), then it is the bundled version of bubblewrap that is included with Flatpak that must be patched. This is typically installed as `/usr/libexec/flatpak-bwrap`. This configuration is the default when building from source code.

For the 1.14.x stable branch, these changes are included in Flatpak 1.14.10. The bundled version of bubblewrap included in this release has been updated to 0.6.3. For the 1.15.x development branch, these changes are included in Flatpak 1.15.10. The bundled version of bubblewrap in this release is a Meson "wrap" subproject, which has been updated to 0.10.0. The 1.12.x and 1.10.x branches will not be updated for this vulnerability. Long-term support OS distributions should backport the individual changes into their versions of Flatpak and bubblewrap, or update to newer versions if their stability policy allows it. As a workaround, avoid using applications using the `persistent` (`--persist`) permission.

Affected products

VendorProductAffectedFixed
flatpak flatpak < 1.14.10, >= 1.15.0, < 1.15.10 —

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.14.10-1 —
Debian 13 flatpak 1.14.10-1 —
Debian 12 flatpak 1.14.10-1~deb12u1 DSA-5749-1
Debian 11 flatpak 1.10.8-0+deb11u3 DLA-4099-1
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS bubblewrap 0.9.0-1ubuntu0.1 USN-7046-1
Ubuntu 24.04 LTS flatpak 1.14.6-1ubuntu0.1 USN-7046-1
Ubuntu 22.04 LTS bubblewrap 0.6.1-1ubuntu0.1 USN-7046-1
Ubuntu 22.04 LTS flatpak 1.12.7-1ubuntu0.1 USN-7046-1
Ubuntu 20.04 LTS bubblewrap 0.4.0-1ubuntu4.1 USN-7046-1
Ubuntu 20.04 LTS flatpak 1.6.5-0ubuntu0.5 USN-7046-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 18.04 LTS flatpak No fix yet —
ReleasePackageFixed inAdvisory
RHEL 9 bubblewrap 0.4.1-7.el9_4 RHSA-2024:9449, RHSA-2024:6356
RHEL 9 flatpak +4 1.12.9-3.el9_4 RHSA-2024:9449, RHSA-2024:6356
RHEL 8 bubblewrap 0.4.0-2.el8_10 RHSA-2024:6422
RHEL 8 flatpak +4 1.12.9-3.el8_10 RHSA-2024:6422
Show 11 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.2 EUS bubblewrap 0.4.1-7.el9_2 RHSA-2024:6355
RHEL 9.2 EUS flatpak +4 1.12.7-5.el9_2 RHSA-2024:6355
RHEL 9.0 E4S bubblewrap 0.4.1-7.el9_0 RHSA-2024:6357
RHEL 9.0 E4S flatpak +3 1.12.5-5.el9_0 RHSA-2024:6357
RHEL 8.8 EUS bubblewrap 0.4.0-2.el8_8 RHSA-2024:6419
RHEL 8.8 EUS flatpak +4 1.10.7-4.el8_8 RHSA-2024:6419
RHEL 8.6 TUS bubblewrap 0.4.0-2.el8_6 RHSA-2024:6421
RHEL 8.6 TUS flatpak +3 1.8.7-4.el8_6 RHSA-2024:6421
RHEL 8.6 E4S bubblewrap 0.4.0-2.el8_6 RHSA-2024:6421
RHEL 8.6 E4S flatpak +3 1.8.7-4.el8_6 RHSA-2024:6421
RHEL 8.6 AUS bubblewrap 0.4.0-2.el8_6 RHSA-2024:6421
RHEL 8.6 AUS flatpak +3 1.8.7-4.el8_6 RHSA-2024:6421
RHEL 8.4 TUS bubblewrap 0.4.0-2.el8_4 RHSA-2024:6418
RHEL 8.4 TUS flatpak +3 1.8.5-7.el8_4 RHSA-2024:6418
RHEL 8.4 E4S bubblewrap 0.4.0-2.el8_4 RHSA-2024:6418
RHEL 8.4 E4S flatpak +3 1.8.5-7.el8_4 RHSA-2024:6418
RHEL 8.4 AUS bubblewrap 0.4.0-2.el8_4 RHSA-2024:6418
RHEL 8.4 AUS flatpak +3 1.8.5-7.el8_4 RHSA-2024:6418
RHEL 8.2 AUS bubblewrap 0.4.0-2.el8_2 RHSA-2024:6420
RHEL 8.2 AUS flatpak +3 1.6.2-9.el8_2 RHSA-2024:6420
RHEL 7 ELS flatpak +2 1.0.9-15.el7_9 RHSA-2024:6417
RHEL 7 ELS flatpak-builder 1.0.0-15.el7_9 RHSA-2024:6417

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 bubblewrap 0.4.1-7.el9_4.alma.1 ALSA-2024:9449, ALSA-2024:6356
AlmaLinux 9 flatpak +4 1.12.9-3.el9_4 ALSA-2024:9449, ALSA-2024:6356
AlmaLinux 8 bubblewrap 0.4.0-2.el8_10 ALSA-2024:6422
AlmaLinux 8 flatpak +4 1.12.9-3.el8_10 ALSA-2024:6422

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 bubblewrap 0.4.1-8.el9_5 RLSA-2024:9449
Rocky Linux 9 flatpak 1.12.9-3.el9_5 RLSA-2024:6356
Rocky Linux 8 bubblewrap 0.4.0-2.el8_10 RLSA-2024:6422
Rocky Linux 8 flatpak 1.12.9-3.el8_10 RLSA-2024:6422
ReleasePackageFixed inAdvisory
SLES 15 SP6 bubblewrap 0.8.0-150500.3.6.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
SLES 15 SP6 flatpak 1.14.6-150600.3.3.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
SLES 15 SP5 bubblewrap 0.8.0-150500.3.6.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
SLES 15 SP5 flatpak 1.14.5-150500.3.12.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
SLES 15 SP5 wayland-protocols 1.36-150500.3.3.1 SUSE-RU-2025:0145-1
SLES 15 SP4 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES 15 SP4 flatpak 1.12.8-150400.3.9.1 SUSE-SU-2024:3174-1
SLES 15 SP3 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES 15 SP3 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
SLES 15 SP2 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES 15 SP2 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 bubblewrap 0.3.3-3.3.1 SUSE-SU-2024:3073-1
SLES 12 SP5 flatpak 1.4.2-3.9.1 SUSE-SU-2024:3073-1
SLES for SAP 15 SP5 bubblewrap 0.11.0-150500.3.9.1 SUSE-RU-2025:0145-1
SLES for SAP 15 SP5 flatpak 1.16.0-150500.3.15.1 SUSE-RU-2025:0145-1
SLES for SAP 15 SP5 wayland-protocols 1.36-150500.3.3.1 SUSE-RU-2025:0145-1
SLES for SAP 15 SP4 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES for SAP 15 SP4 flatpak 1.12.8-150400.3.9.1 SUSE-SU-2024:3174-1
SLES for SAP 15 SP3 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES for SAP 15 SP3 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
SLES for SAP 15 SP2 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLES for SAP 15 SP2 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
SLES for SAP 12 SP5 bubblewrap 0.3.3-3.3.1 SUSE-SU-2024:3073-1
SLES for SAP 12 SP5 flatpak 1.4.2-3.9.1 SUSE-SU-2024:3073-1
SLE HPC 15 SP5 bubblewrap 0.11.0-150500.3.9.1 SUSE-RU-2025:0145-1
SLE HPC 15 SP5 flatpak 1.16.0-150500.3.15.1 SUSE-RU-2025:0145-1
SLE HPC 15 SP5 wayland-protocols 1.36-150500.3.3.1 SUSE-RU-2025:0145-1
SLE HPC 15 SP4 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLE HPC 15 SP4 flatpak 1.12.8-150400.3.9.1 SUSE-SU-2024:3174-1
SLE HPC 15 SP3 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLE HPC 15 SP3 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
SLE HPC 15 SP2 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SLE HPC 15 SP2 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
SUSE Manager Server 4.3 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SUSE Manager Proxy 4.3 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SUSE Enterprise Storage 7.1 bubblewrap 0.4.1-150200.3.3.1 SUSE-SU-2024:3174-1
SUSE Enterprise Storage 7.1 flatpak 1.10.8-150200.4.21.1 SUSE-SU-2024:3174-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed bubblewrap 0.10.0-1.1 openSUSE-SU-2024:14269-1
openSUSE Tumbleweed flatpak 1.15.10-1.1 openSUSE-SU-2024:14275-1
openSUSE Leap 15.6 bubblewrap 0.8.0-150500.3.6.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
openSUSE Leap 15.6 flatpak 1.14.6-150600.3.3.1 SUSE-SU-2024:3104-1, SUSE-RU-2025:0145-1
openSUSE Leap 15.5 bubblewrap 0.8.0-150500.3.6.1 SUSE-SU-2024:3104-1
openSUSE Leap 15.5 flatpak 1.14.5-150500.3.12.1 SUSE-SU-2024:3104-1
ReleasePackageFixed inAdvisory
Alpine v3.24 bubblewrap 0.10.0-r0 —
Alpine v3.24 flatpak 1.14.10-r0 —
Alpine v3.23 bubblewrap 0.10.0-r0 —
Alpine v3.23 flatpak 1.14.10-r0 —
Alpine v3.22 bubblewrap 0.10.0-r0 —
Alpine v3.22 flatpak 1.14.10-r0 —
Alpine v3.21 bubblewrap 0.10.0-r0 —
Alpine v3.21 flatpak 1.14.10-r0 —
Alpine v3.20 bubblewrap 0.10.0-r0 —
Alpine v3.20 flatpak 1.14.10-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 bubblewrap 0.10.0-1.amzn2023.0.1 ALAS2023-2024-726
Amazon Linux 2023 flatpak +5 1.15.10-1.amzn2023.0.1 ALAS2023-2024-745
Amazon Linux 2 flatpak +2 1.0.9-10.amzn2.0.6 ALAS2-2024-2712
Amazon Linux 2 flatpak-builder 1.0.0-10.amzn2.0.6 ALAS2-2024-2712

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 bubblewrap 0.4.1-7.el9_4 ELSA-2024-9449, ELSA-2024-6356
Oracle Linux 9 flatpak +4 1.12.9-3.el9_4 ELSA-2024-9449, ELSA-2024-6356
Oracle Linux 8 bubblewrap 0.4.0-2.el8_10 ELSA-2024-6422
Oracle Linux 8 flatpak +4 1.12.9-3.el8_10 ELSA-2024-6422
Oracle Linux 7 flatpak +2 1.0.9-13.0.1.el7_9 ELSA-2024-6417
Oracle Linux 7 flatpak-builder 1.0.0-13.0.1.el7_9 ELSA-2024-6417

Advisories 34

References