CVE-2022-21682
flatpak-builder can access files outside the build directory.
Mitigation
- Upgrade flatpak to 1.10.6 or later.
Who should check
- Anyone running flatpak >= 1.11.0, < 1.12.3; < 1.10.6
Vulnerability facts
- Affected
- flatpak >= 1.11.0, < 1.12.3; < 1.10.6
- Fixed in
- flatpak 1.12.3, flatpak 1.10.6
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 7.7 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: None
- EPSS
- 1.53% chance of exploitation in 30 days (percentile 75, 2026-11-26)
- CWE
- CWE-22
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| flatpak | >= 1.11.0, < 1.12.3; < 1.10.6 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2022-21682. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2022-21682.md Affected: flatpak >= 1.11.0, < 1.12.3; < 1.10.6 Fixed in: flatpak 1.12.3, flatpak 1.10.6 Steps: 1. Search this machine and project for flatpak: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://github.com/flatpak/flatpak/security/advisories/GHSA-8ch7-5j3h-g4fx
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APFTBYGJJVJPFVHRXUW5PII5XOAFI4KH/
- https://www.debian.org/security/2022/dsa-5049
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IXKBERLJRYV7KXKGXOLI6IOXVBQNN4DP/
- https://security.gentoo.org/glsa/202312-12
FAQ
Is CVE-2022-21682 being exploited?
There is no confirmed exploitation: CVE-2022-21682 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.53% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2022-21682?
High: CVSS 7.7 (v3.1, scored by CNA). Remote, login needed.
Which versions are affected by CVE-2022-21682?
flatpak >= 1.11.0, < 1.12.3; < 1.10.6.
Is there a fix for CVE-2022-21682?
Yes. Fixed in flatpak 1.12.3, flatpak 1.10.6. Upgrade flatpak to 1.10.6 or later.
How do I check if I'm affected by CVE-2022-21682?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.