CVEfocus › CVE database › CVE-2022-21682

CVE-2022-21682flatpak-builder can access files outside the build directory.

CVSS 7.7 HighEPSS 1.5% (higher than 75% of CVEs)Published 2022-01-13Updated 2024-08-03Assigner: GitHub_M

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`.

CWE-22

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

25Fixed
3Fix pending
11Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04flatpakNot affected
vulnerable_code_not_present
Ubuntu 25.10flatpakNot affected
vulnerable_code_not_present
Ubuntu 22.04flatpakFix pendingUBUNTU-CVE-2022-21682
Ubuntu 20.04flatpakFix pendingUBUNTU-CVE-2022-21682
Ubuntu 18.04flatpakFix pendingUBUNTU-CVE-2022-21682
Debian 14flatpakFixed1.12.3-1DEBIAN-CVE-2022-21682
Debian 13flatpakFixed1.12.3-1DEBIAN-CVE-2022-21682
Debian 12flatpakFixed1.12.3-1DEBIAN-CVE-2022-21682
Red Hat Enterprise Linux 9flatpakNot affected
Red Hat Enterprise Linux 9flatpak-develNot affected
Red Hat Enterprise Linux 9flatpak-libsNot affected
Red Hat Enterprise Linux 9flatpak-selinuxNot affected
Red Hat Enterprise Linux 9flatpak-session-helperNot affected
Red Hat Enterprise Linux 8flatpak-builderFixed0:1.0.14-2.el8RHSA-2022:7458
Red Hat Enterprise Linux 7flatpakNot affected
Red Hat Enterprise Linux 7flatpak-builderNot affected
Red Hat Enterprise Linux 7flatpak-develNot affected
Red Hat Enterprise Linux 7flatpak-libsNot affected
AlmaLinux 8flatpak-builderFixed1.0.14-2.el8ALSA-2022:7458
Rocky Linux 8flatpak-builderFixed0:1.0.14-2.el8RLSA-2022:7458
Alpine Linux 3.24flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.24flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.23flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.23flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.22flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.22flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.21flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.21flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.20flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.20flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.19flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.19flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.18flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.18flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.17flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.17flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.16flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682
Alpine Linux 3.16flatpak-builderFixed1.2.2-r0ALPINE-CVE-2022-21682
Alpine Linux 3.15flatpakFixed1.12.5-r0ALPINE-CVE-2022-21682

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.