CVE-2022-21682

flatpak-builder can access files outside the build directory.

MEDIUM
6.5
CVSS Score
Published: January 13, 2022 at 12:00 AM UTC
Updated: June 17, 2026 at 04:26 AM UTC
5 products affected across 4 vendorsDebian LinuxFedoraEnterprise Linux

Using flatpak by flatpak?

Get instant alerts when new vulnerabilities affect flatpak - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.5
Exploit prediction
EPSS 2%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 1.10.6v < 1.10.7v < 1.12.31.11.1 ≤ v < 1.12.4
Affected range stops below 1.10.6, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.10.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.12.3, so it looks safe — our inference, not a vendor statement
Affected range stops below 1.12.4, so it looks safe — our inference, not a vendor statement
v < 1.2.2
Affected range stops below 1.2.2, so it looks safe — our inference, not a vendor statement

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
HIGH
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-22

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card