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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.7
- **CVSS:** 7.7 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 1.53% (percentile 75, 2026-11-26)
- **CWE:** CWE-22
- **Published:** 2022-01-13T00:00:00.000Z
- **Modified:** 2026-06-17T04:26:45.213Z

## Who should check

- Anyone running flatpak \>= 1.11.0, \< 1.12.3; \< 1.10.6

## 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

- flatpak: \>= 1.11.0, \< 1.12.3; \< 1.10.6 (cvelist)

## Mitigation

- Upgrade flatpak to 1.10.6 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

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

## References

- vendor: <https://github.com/flatpak/flatpak/security/advisories/GHSA-8ch7-5j3h-g4fx>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APFTBYGJJVJPFVHRXUW5PII5XOAFI4KH/>
- vendor: <https://www.debian.org/security/2022/dsa-5049>
- vendor: <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IXKBERLJRYV7KXKGXOLI6IOXVBQNN4DP/>
- vendor: <https://security.gentoo.org/glsa/202312-12>
- patch: <https://github.com/flatpak/flatpak/commit/445bddeee657fdc8d2a0a1f0de12975400d4fc1a>
- patch: <https://github.com/flatpak/flatpak/commit/4d11f77aa7fd3e64cfa80af89d92567ab9e8e6fa>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-21682>

HTML: <https://flawdb.com/CVE-2022-21682> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-21682>
