Skip to content
Fencer Vulns
high 7.7

CVE-2022-21682 json

flatpak-builder can access files outside the build directory.

published 2022-01-13 4 y ago modified 2026-06-17 4 mo ago also EUVD-2022-26892

cvss
7.7
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.8%
EPSS 1.8% chance of exploitation in 30 days, percentile 79%
public exploits
0
none known

Summary

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

Patch / fix

  • flatpak flatpak 1.10.7, 1.12.4
  • flatpak flatpak-builder 1.2.2
  • flatpak Debian 14, Debian 13, Debian 12 1.12.3-1

debian advisories DEBIAN-CVE-2022-21682

  • flatpak-builder RHEL 8 1.0.14-2.el8

red hat advisories RHSA-2022:7458

  • flatpak SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +8 more 1.10.7-4.12.1

suse advisories SUSE-SU-2022:0712-1

  • flatpak-builder openSUSE Tumbleweed 1.2.2-1.1
  • flatpak openSUSE Tumbleweed 1.12.4-1.1
  • flatpak openSUSE Leap 15.3 1.10.7-4.12.1

opensuse advisories openSUSE-SU-2024:11755-1openSUSE-SU-2024:11756-1openSUSE-SU-2022:0712-1

  • flatpak-builder AlmaLinux 8 1.0.14-2.el8

almalinux advisories ALSA-2022:7458

  • flatpak-builder Rocky Linux 8 1.0.14-2.el8

rocky linux advisories RLSA-2022:7458

  • flatpak Alpine 3.24, Alpine 3.23, Alpine 3.22 +7 more 1.12.5-r0
  • flatpak-builder Alpine 3.24, Alpine 3.23, Alpine 3.22 +6 more 1.2.2-r0

alpine advisories ALPINE-CVE-2022-21682

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2022-21682 updated cvss 7.7

flatpak: flatpak-builder --mirror-screenshots-url can access files outside the build directory

  • Red Hat Enterprise Linux AppStream (v. 8) flatpak-builder 1.0.14-2.el8
    fixed: vendor fix RHSA-2022:7458
  • Red Hat Enterprise Linux 7 flatpak, flatpak-libs, flatpak-builder Red Hat Enterprise Linux 9 flatpak, flatpak-libs, flatpak-selinux, flatpak-session-helper
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

1.84% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 7.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
NVD 2.0 4.0 AV:N/AC:L/Au:S/C:N/I:P/A:N

Affected products

  • flatpak flatpak

Classification

Weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.