{"id":"CVE-2024-32462","summary":"Flatpak vulnerable to a sandbox escape via RequestBackground portal due to bad argument parsing","details":"Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. in versions before 1.10.9, 1.12.9, 1.14.6, and 1.15.8, a malicious or compromised Flatpak app could execute arbitrary code outside its sandbox. Normally, the `--command` argument of `flatpak run` expects to be given a command to run in the specified Flatpak app, optionally along with some arguments. However it is possible to instead pass `bwrap` arguments to `--command=`, such as `--bind`. It's possible to pass an arbitrary `commandline` to the portal interface `org.freedesktop.portal.Background.RequestBackground` from within a Flatpak app. When this is converted into a `--command` and arguments, it achieves the same effect of passing arguments directly to `bwrap`, and thus can be used for a sandbox escape. The solution is to pass the `--` argument to `bwrap`, which makes it stop processing options. This has been supported since bubblewrap 0.3.0. All supported versions of Flatpak require at least that version of bubblewrap. xdg-desktop-portal version 1.18.4 will mitigate this vulnerability by only allowing Flatpak apps to create .desktop files for commands that do not start with --. The vulnerability is patched in 1.15.8, 1.10.9, 1.12.9, and 1.14.6.","aliases":["GHSA-phv6-cpc2-2fgj"],"modified":"2026-08-18T17:26:54.209629Z","published":"2024-04-18T18:11:27.680Z","related":["ALSA-2024:3959","ALSA-2024:3961","SUSE-RU-2025:0145-1","SUSE-SU-2024:1535-1","SUSE-SU-2024:1536-1","SUSE-SU-2024:1547-1","SUSE-SU-2024:1548-1","SUSE-SU-2024:1803-1","SUSE-SU-2024:1806-1","SUSE-SU-2024:1831-1","SUSE-SU-2024:1832-1","SUSE-SU-2024:2067-1","openSUSE-SU-2024:13899-1","openSUSE-SU-2024:13985-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-88"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32462.json"},"references":[{"type":"WEB","url":"http://www.openwall.com/lists/oss-security/2024/04/18/5"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/IB6VQAF5S2YOBULDHPUKPOEIKONOP5KO/"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZFNSCFJVMAQK5AF55JBN7OSJP3CREDBD/"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32462.json"},{"type":"ADVISORY","url":"https://github.com/flatpak/flatpak/security/advisories/GHSA-phv6-cpc2-2fgj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-32462"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e"},{"type":"FIX","url":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/flatpak/flatpak","events":[{"introduced":"0"},{"fixed":"627e42b5e2648feccd8c8fda0a129f7215998899"},{"introduced":"0cfd72442dd7301b0699725e25eb0552da3b5e98"},{"fixed":"e7264e28ad3ede9439960c82cbdb59772080a579"},{"introduced":"488038eed44c7edf334d1e28085975d96ce2bdcc"},{"fixed":"3344a7a72ff2e3e728e31c846fff42bda14429dd"},{"introduced":"e084a4f14befc27d08094baba8cc8f714d7e417d"},{"fixed":"925c80f913d69e7ca424428823e1431c4ffb0deb"},{"fixed":"72016e3fce8fcbeab707daf4f1a02b931fcc004d"},{"fixed":"81abe2a37d363f5099c3d0bdcd0caad6efc5bf97"},{"fixed":"b7c1a558e58aaeb1d007d29529bbb270dc4ff11e"},{"fixed":"bbab7ed1e672356d1a78b422462b210e8e875931"}],"database_specific":{"cpe":"cpe:2.3:a:flatpak:flatpak:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"1.10.9"},{"introduced":"1.12.0"},{"fixed":"1.12.9"},{"introduced":"1.14.0"},{"fixed":"1.14.6"},{"introduced":"1.15.0"},{"fixed":"1.15.8"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["1.10.8","1.12.8","1.15.7","1.14.5","1.15.6","1.14.4","1.15.4","1.14.3","1.15.3","1.14.2","1.15.2","1.14.1","1.15.1","1.15.0","1.14.0","1.12.7","1.12.6","1.12.5","1.10.7","1.12.4","1.10.6","1.12.3","1.12.2","1.10.5","1.12.1","1.10.4","1.12.0","1.10.3","1.10.2","1.10.1","1.10.0","1.9.3","1.9.2","1.9.1","1.8.0","1.7.3","1.7.2","1.7.1","1.6.2","1.6.1","1.6.0","1.5.2","1.5.1","1.5.0","1.4.0","1.3.4","1.3.3","1.3.2","1.3.1","1.3.0","1.2.1","1.2.0","1.1.3","1.1.2","1.1.1","1.1.0","1.0.3","1.0.2","1.0.1","1.0.0","0.99.3","0.99.2","0.99.1","0.11.8.3","0.11.8.2","0.11.8.1","0.11.8","0.11.7","0.11.6","0.11.5","0.11.4","0.11.3","0.11.2","0.11.1","0.10.2","0.10.1","0.10.0","0.9.99","0.9.98.2","0.9.98.1","0.9.98","0.9.12","0.9.11","0.9.10","0.9.9","0.9.8","0.9.7","0.9.6","0.9.5","0.9.4","0.9.3","0.9.2","0.9.1","0.8.1","0.8.0","0.6.14","0.6.13","0.6.12","0.6.11","0.6.10","0.6.9","0.6.8","0.6.7","0.6.6","0.6.5","0.6.4","0.6.3","0.6.2","0.6.1","0.6.0","0.5.2","0.5.1","0.5.0","0.4.13","0.4.12","0.4.11","0.4.10","0.4.9","0.4.8","0.4.7","0.4.6","0.4.5","0.4.4","0.4.3","0.4.2.1","0.4.2","0.4.1","0.4.0","0.3.6","0.3.5","0.3.4","0.3.3","0.3.2","0.3.1","0.3","0.2.1","0.2","0.1"],"database_specific":{"vanir_signatures_modified":"2026-08-18T17:26:54Z","vanir_signatures":[{"source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-dir.c"},"deprecated":false,"digest":{"line_hashes":["317769743648359304758329909821865367787","319436217136493251617755883489252570054","336373015549276148258444673140071363811","243828145650739975163817252022426979032"],"threshold":0.9},"id":"CVE-2024-32462-0698af53","signature_type":"Line","signature_version":"v1"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"function":"flatpak_run_app","file":"common/flatpak-run.c"},"deprecated":false,"digest":{"length":13560,"function_hash":"109913409286668749569561208472089366551"},"id":"CVE-2024-32462-1773d0eb"},{"target":{"file":"app/flatpak-builtins-build.c","function":"flatpak_builtin_build"},"deprecated":false,"digest":{"function_hash":"208236299568725957026369299329212808673","length":10037},"id":"CVE-2024-32462-1b727b31","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931"},{"deprecated":false,"digest":{"line_hashes":["118471398715978625219295879568900055403","20025332458569613793533901463776785882","189579782292545310696055241004848827188","154938707910802800210569888298073220483"],"threshold":0.9},"id":"CVE-2024-32462-1c2894d7","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e","target":{"file":"app/flatpak-builtins-build.c"}},{"source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"app/flatpak-builtins-build.c","function":"flatpak_builtin_build"},"deprecated":false,"digest":{"function_hash":"163588664375792742057312413402510238378","length":9817},"id":"CVE-2024-32462-3c5c8d7b","signature_type":"Function","signature_version":"v1"},{"target":{"file":"app/flatpak-builtins-build.c","function":"flatpak_builtin_build"},"deprecated":false,"digest":{"function_hash":"335593857996861262461975364276361972319","length":9995},"id":"CVE-2024-32462-456b1c1e","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e"},{"source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_run_triggers"},"deprecated":false,"digest":{"function_hash":"200579764972954978415763017127709428648","length":2146},"id":"CVE-2024-32462-45f67e2a","signature_type":"Function","signature_version":"v1"},{"deprecated":false,"digest":{"line_hashes":["317769743648359304758329909821865367787","319436217136493251617755883489252570054","336373015549276148258444673140071363811","243828145650739975163817252022426979032"],"threshold":0.9},"id":"CVE-2024-32462-4d6b1d94","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"file":"common/flatpak-dir.c"}},{"source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"common/flatpak-run.c","function":"add_bwrap_wrapper"},"deprecated":false,"digest":{"function_hash":"278148503921999970531051325527233897139","length":1698},"id":"CVE-2024-32462-58f88854","signature_type":"Function","signature_version":"v1"},{"deprecated":false,"digest":{"function_hash":"289856988089759279109298409562696033542","length":2125},"id":"CVE-2024-32462-68066267","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_run_triggers"}},{"id":"CVE-2024-32462-703a80ef","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"app/flatpak-builtins-build.c"},"deprecated":false,"digest":{"line_hashes":["118471398715978625219295879568900055403","20025332458569613793533901463776785882","189579782292545310696055241004848827188","154938707910802800210569888298073220483"],"threshold":0.9}},{"digest":{"line_hashes":["317769743648359304758329909821865367787","319436217136493251617755883489252570054","336373015549276148258444673140071363811","243828145650739975163817252022426979032"],"threshold":0.9},"id":"CVE-2024-32462-7a483525","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"common/flatpak-dir.c"},"deprecated":false},{"digest":{"function_hash":"65042962968422244001954748261736317558","length":1747},"id":"CVE-2024-32462-7c6d520c","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-run-dbus.c","function":"add_bwrap_wrapper"},"deprecated":false},{"target":{"file":"common/flatpak-run.c","function":"add_bwrap_wrapper"},"deprecated":false,"digest":{"function_hash":"278148503921999970531051325527233897139","length":1698},"id":"CVE-2024-32462-81ab9bf5","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97"},{"target":{"file":"common/flatpak-run.c"},"deprecated":false,"digest":{"line_hashes":["330762700364318858044760854883322074642","47443605241193744693354227288728767104","211970635136706510616166223980677422942","246182905536897567126587492449763505222","219747996955212092350011752328363779573","46225423996768789458063305237027922098","96896721729740781962316630159747739336"],"threshold":0.9},"id":"CVE-2024-32462-93c4820c","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e"},{"digest":{"line_hashes":["317769743648359304758329909821865367787","319436217136493251617755883489252570054","336373015549276148258444673140071363811","243828145650739975163817252022426979032"],"threshold":0.9},"id":"CVE-2024-32462-9e9cb812","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e","target":{"file":"common/flatpak-dir.c"},"deprecated":false},{"source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e","target":{"file":"common/flatpak-run.c","function":"add_bwrap_wrapper"},"deprecated":false,"digest":{"function_hash":"65042962968422244001954748261736317558","length":1747},"id":"CVE-2024-32462-9ef72b9e","signature_type":"Function","signature_version":"v1"},{"deprecated":false,"digest":{"function_hash":"116639477181726702656461057101522348529","length":10823},"id":"CVE-2024-32462-a134d38c","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"common/flatpak-run.c","function":"flatpak_run_app"}},{"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["330762700364318858044760854883322074642","47443605241193744693354227288728767104","211970635136706510616166223980677422942","246182905536897567126587492449763505222","219747996955212092350011752328363779573","46225423996768789458063305237027922098","96896721729740781962316630159747739336"]},"id":"CVE-2024-32462-a80c8470","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"file":"common/flatpak-run.c"}},{"source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_run_triggers"},"deprecated":false,"digest":{"function_hash":"289856988089759279109298409562696033542","length":2125},"id":"CVE-2024-32462-cbe06f05","signature_type":"Function","signature_version":"v1"},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/b7c1a558e58aaeb1d007d29529bbb270dc4ff11e","target":{"function":"flatpak_run_app","file":"common/flatpak-run.c"},"deprecated":false,"digest":{"function_hash":"228947040055073626105463498559555420040","length":14297},"id":"CVE-2024-32462-cd2b76ff"},{"digest":{"function_hash":"27107804023291048665905029837043147751","length":14656},"id":"CVE-2024-32462-d6c665a2","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-run.c","function":"flatpak_run_app"},"deprecated":false},{"source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-run-dbus.c"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["173953116240382667356606877338432503369","47443605241193744693354227288728767104","327395398367859154578757166920687881873"]},"id":"CVE-2024-32462-da0ab89a","signature_type":"Line","signature_version":"v1"},{"deprecated":false,"digest":{"line_hashes":["246182905536897567126587492449763505222","219747996955212092350011752328363779573","46225423996768789458063305237027922098","96896721729740781962316630159747739336"],"threshold":0.9},"id":"CVE-2024-32462-de37092f","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/bbab7ed1e672356d1a78b422462b210e8e875931","target":{"file":"common/flatpak-run.c"}},{"deprecated":false,"digest":{"function_hash":"30464788194787519836043672269285636301","length":2200},"id":"CVE-2024-32462-dfbebd6e","signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"common/flatpak-dir.c","function":"flatpak_dir_run_triggers"}},{"deprecated":false,"digest":{"line_hashes":["118471398715978625219295879568900055403","20025332458569613793533901463776785882","189579782292545310696055241004848827188","154938707910802800210569888298073220483"],"threshold":0.9},"id":"CVE-2024-32462-eeafc64e","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"file":"app/flatpak-builtins-build.c"}},{"id":"CVE-2024-32462-f19a4e33","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"app/flatpak-builtins-build.c"},"deprecated":false,"digest":{"line_hashes":["118471398715978625219295879568900055403","20025332458569613793533901463776785882","189579782292545310696055241004848827188","154938707910802800210569888298073220483"],"threshold":0.9}},{"deprecated":false,"digest":{"line_hashes":["330762700364318858044760854883322074642","47443605241193744693354227288728767104","211970635136706510616166223980677422942","246182905536897567126587492449763505222","219747996955212092350011752328363779573","46225423996768789458063305237027922098","96896721729740781962316630159747739336"],"threshold":0.9},"id":"CVE-2024-32462-faf1a5fb","signature_type":"Line","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/72016e3fce8fcbeab707daf4f1a02b931fcc004d","target":{"file":"common/flatpak-run.c"}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/flatpak/flatpak/commit/81abe2a37d363f5099c3d0bdcd0caad6efc5bf97","target":{"file":"app/flatpak-builtins-build.c","function":"flatpak_builtin_build"},"deprecated":false,"digest":{"function_hash":"71440669775031959586668012640547353550","length":9988},"id":"CVE-2024-32462-fdf19660"}],"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-32462.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N"}]}