{"schemaVersion":3,"id":"CVE-2022-21682","aliases":["RHSA-2022:7458","UBUNTU-CVE-2022-21682","DEBIAN-CVE-2022-21682","openSUSE-SU-2024:11755-1","openSUSE-SU-2024:11756-1"],"status":"published","duplicateOf":null,"title":null,"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`.","dates":{"published":"2022-01-13T00:00:00.000Z","modified":"2024-08-03T02:46:39.409Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.7,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Red hat","score":7.7,"severity":"high","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N","exploitability":7.9,"impact":6.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","exploitability":7.2,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","exploitability":7.2,"impact":6,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.5,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":4,"severity":"medium","vector":"AV:N/AC:L/Au:S/C:N/I:P/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01679,"percentile":0.76612,"severity":"low","asOf":"2026-10-20T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-20T00:00:00.000Z","baselineScore":0.01679},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01679,"percentile":0.76612}],"last30":[{"date":"2026-09-20T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01679,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.01679,"percentile":0.76612}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')","description":"The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.","type":"weakness","status":"Stable","abstraction":"Base","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/22.html"}],"affected":[{"vendor":"debian","product":"flatpak","name":"flatpak","label":"flatpak","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/flatpak","purlType":"deb","versions":[{"text":"< 1.12.3-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.12.3-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"flatpak","name":"flatpak","label":"flatpak","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/flatpak","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"debian","product":"debian_linux","name":"debian linux","label":"debian_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"9.0","noFixRecorded":false,"fixedIn":null},{"text":"10.0","noFixRecorded":false,"fixedIn":null},{"text":"11.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"9.0 | 10.0 | 11.0","eol":{"isEol":true,"eolDate":"2022-07-01T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"9","label":"9 (Stretch)","eolFrom":"2022-07-01T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"9.13"},"product":{"name":"debian","label":"Debian","category":"os"}},"hubHref":"/vendor/debian/debian_linux"},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"35","noFixRecorded":false,"fixedIn":null}],"versionsText":"35","eol":{"isEol":true,"eolDate":"2022-12-13T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"35","label":"35","eolFrom":"2022-12-13T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"flatpak","product":"flatpak","name":"flatpak","label":"flatpak","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 1.11.0, < 1.12.3","noFixRecorded":false,"fixedIn":null},{"text":"< 1.10.6","noFixRecorded":false,"fixedIn":null},{"text":"< 1.10.7","noFixRecorded":false,"fixedIn":null},{"text":"≥ 1.11.1, < 1.12.4","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 1.11.0, < 1.12.3 | < 1.10.6 | < 1.10.7 | ≥ 1.11.1, < 1.12.4","eol":null,"hubHref":"/vendor/flatpak/flatpak"},{"vendor":"flatpak","product":"flatpak-builder","name":"flatpak-builder","label":"flatpak-builder","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 1.2.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.2.2","eol":null,"hubHref":"/vendor/flatpak/flatpak-builder"},{"vendor":"redhat","product":"enterprise_linux","name":"enterprise linux","label":"enterprise_linux","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"8.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"8.0","eol":{"isEol":false,"eolDate":"2029-05-31T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"8","label":"8 (Upcoming ELS)","eolFrom":"2029-05-31T00:00:00.000Z","isLts":false,"isMaintained":true,"latestVersion":"8.10"},"product":{"name":"rhel","label":"Red Hat Enterprise Linux","category":"os"}},"hubHref":"/vendor/redhat/enterprise_linux"},{"vendor":"opensuse","product":"flatpak-builder&distro=openSUSE Tumbleweed","name":"flatpak-builder","label":"flatpak-builder&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/flatpak-builder&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 1.2.2-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.2.2-1.1","eol":null,"hubHref":null},{"vendor":"opensuse","product":"flatpak&distro=openSUSE Tumbleweed","name":"flatpak","label":"flatpak&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/flatpak&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 1.12.4-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 1.12.4-1.1","eol":null,"hubHref":null},{"vendor":"redhat","product":"flatpak-builder","name":"flatpak-builder","label":"flatpak-builder","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/flatpak-builder","purlType":"rpm","versions":[{"text":"< 0:1.0.14-2.el8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.0.14-2.el8","eol":null,"hubHref":null},{"vendor":"redhat","product":"flatpak-builder-debuginfo","name":"flatpak-builder-debuginfo","label":"flatpak-builder-debuginfo","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/flatpak-builder-debuginfo","purlType":"rpm","versions":[{"text":"< 0:1.0.14-2.el8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.0.14-2.el8","eol":null,"hubHref":null},{"vendor":"redhat","product":"flatpak-builder-debugsource","name":"flatpak-builder-debugsource","label":"flatpak-builder-debugsource","ecosystem":"Red Hat","cpePart":null,"purl":"pkg:rpm/redhat/flatpak-builder-debugsource","purlType":"rpm","versions":[{"text":"< 0:1.0.14-2.el8","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 0:1.0.14-2.el8","eol":null,"hubHref":null}],"affectedCount":12,"eol":{"hasEol":true,"count":2},"references":[{"url":"https://github.com/flatpak/flatpak/security/advisories/GHSA-8ch7-5j3h-g4fx","label":"github.com/flatpak/flatpak/security/advisories/GHSA-8ch7-5j3h-g4fx","hostname":"github.com","tags":["ARTICLE","REPORT","Patch","Third Party Advisory"]},{"url":"https://github.com/flatpak/flatpak/commit/445bddeee657fdc8d2a0a1f0de12975400d4fc1a","label":"github.com/flatpak/flatpak/commit/445bddeee657fdc8d2a0a1f0de12975400d4fc1a","hostname":"github.com","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/flatpak/flatpak/commit/4d11f77aa7fd3e64cfa80af89d92567ab9e8e6fa","label":"github.com/flatpak/flatpak/commit/4d11f77aa7fd3e64cfa80af89d92567ab9e8e6fa","hostname":"github.com","tags":["Patch","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APFTBYGJJVJPFVHRXUW5PII5XOAFI4KH/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory"]},{"url":"https://www.debian.org/security/2022/dsa-5049","label":"www.debian.org/security/2022/dsa-5049","hostname":"www.debian.org","tags":["Vendor Advisory","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IXKBERLJRYV7KXKGXOLI6IOXVBQNN4DP/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory"]},{"url":"https://security.gentoo.org/glsa/202312-12","label":"security.gentoo.org/glsa/202312-12","hostname":"security.gentoo.org","tags":["Vendor Advisory"]},{"url":"https://access.redhat.com/errata/RHSA-2022:7458","label":"access.redhat.com/errata/RHSA-2022:7458","hostname":"access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/updates/classification/#moderate","label":"access.redhat.com/security/updates/classification/","hostname":"access.redhat.com","tags":["ARTICLE"]},{"url":"https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.7_release_notes/index","label":"access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.7_release_notes/index","hostname":"access.redhat.com","tags":["ARTICLE"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2041592","label":"bugzilla.redhat.com/show_bug.cgi?id=2041592","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2047312","label":"bugzilla.redhat.com/show_bug.cgi?id=2047312","hostname":"bugzilla.redhat.com","tags":["REPORT"]},{"url":"https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_7458.json","label":"security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_7458.json","hostname":"security.access.redhat.com","tags":["Advisory"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-21682","label":"access.redhat.com/security/cve/CVE-2022-21682","hostname":"access.redhat.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-21682","label":"www.cve.org/CVERecord?id=CVE-2022-21682","hostname":"www.cve.org","tags":["Advisory","REPORT"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-21682","label":"nvd.nist.gov/vuln/detail/CVE-2022-21682","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://ubuntu.com/security/CVE-2022-21682","label":"ubuntu.com/security/CVE-2022-21682","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-21682","label":"security-tracker.debian.org/tracker/CVE-2022-21682","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2022-21682","label":"www.suse.com/security/cve/CVE-2022-21682","hostname":"www.suse.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["DSA-5049-1","MGASA-2022-0131","OPENSUSE-SU-2022:0712-1","SUSE-SU-2022:0712-1"],"duplicates":[],"related":["OPENSUSE-SU-2022:0712-1","SUSE-SU-2022:0712-1"]},"timeline":[{"kind":"published","date":"2022-01-13T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T02:46:39.409Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":31,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T13:34:19.360Z","stale":false,"partial":false}}