# CVE-2024-32462: Flatpak vulnerable to a sandbox escape via RequestBackground portal due to bad argument parsing

> A malicious Flatpak app can escape its sandbox and execute arbitrary code on the host by injecting bwrap arguments via the RequestBackground portal.

- **Severity:** High 8.4 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Apr 2024
- **Updated:** 16 Dec 2025
- **Also known as:** ALSA-2024:3959, ALSA-2024:3961, CLEANSTART-2024-IL49391, CLSA-2025-1741215879, DEBIAN-CVE-2024-32462, DSA-5666-1, GHSA-phv6-cpc2-2fgj, MGASA-2024-0229, OESA-2024-1490, RHSA-2024:3959, RHSA-2024:3960, RHSA-2024:3961, RHSA-2024:3962, RHSA-2024:3963, RHSA-2024:3969, RHSA-2024:3970, RHSA-2024:3979, RHSA-2024:3980, RLSA-2024:3959, RLSA-2024:3961, 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, UBUNTU-CVE-2024-32462, openSUSE-SU-2024:13899-1, openSUSE-SU-2024:13985-1

## What is CVE-2024-32462?

CVE-2024-32462 is a high-severity command injection vulnerability in Fedoraproject Fedora, published on 18 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

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.

Weakness: CWE-88 (Improper Neutralization of Argument Delimiters in a Command)

## Which versions are affected by CVE-2024-32462?

It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `flatpak` | AlmaLinux:8 | All versions | 1.12.9-1.el8_10 |
| `flatpak-devel` | AlmaLinux:8 | All versions | 1.12.9-1.el8_10 |
| `flatpak-libs` | AlmaLinux:8 | All versions | 1.12.9-1.el8_10 |
| `flatpak-selinux` | AlmaLinux:8 | All versions | 1.12.9-1.el8_10 |
| `flatpak-session-helper` | AlmaLinux:8 | All versions | 1.12.9-1.el8_10 |
| `flatpak` | AlmaLinux:9 | All versions | 1.12.9-1.el9_4 |
| `flatpak-devel` | AlmaLinux:9 | All versions | 1.12.9-1.el9_4 |
| `flatpak-libs` | AlmaLinux:9 | All versions | 1.12.9-1.el9_4 |
| `flatpak-selinux` | AlmaLinux:9 | All versions | 1.12.9-1.el9_4 |
| `flatpak-session-helper` | AlmaLinux:9 | All versions | 1.12.9-1.el9_4 |
| `flatpak` | Red Hat:enterprise_linux:7::client | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-builder` | Red Hat:enterprise_linux:7::client | All versions | 0:1.0.0-13.el7_9 |
| `flatpak-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-libs` | Red Hat:enterprise_linux:7::client | All versions | 0:1.0.9-13.el7_9 |
| `flatpak` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-builder` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.0.0-13.el7_9 |
| `flatpak-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-libs` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.0.9-13.el7_9 |
| `flatpak` | Red Hat:enterprise_linux:7::server | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-builder` | Red Hat:enterprise_linux:7::server | All versions | 0:1.0.0-13.el7_9 |
| `flatpak-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-devel` | Red Hat:enterprise_linux:7::server | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-libs` | Red Hat:enterprise_linux:7::server | All versions | 0:1.0.9-13.el7_9 |
| `flatpak` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-builder` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.0.0-13.el7_9 |
| `flatpak-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-devel` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.0.9-13.el7_9 |
| `flatpak-libs` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.0.9-13.el7_9 |
| `flatpak` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-debugsource` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-libs` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-libs-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-selinux` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-session-helper` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-session-helper-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak-tests-debuginfo` | Red Hat:enterprise_linux:8::appstream | All versions | 0:1.12.9-1.el8_10 |
| `flatpak` | Red Hat:enterprise_linux:8::crb | All versions | 0:1.12.9-1.el8_10 |

Products: Fedoraproject Fedora, Flatpak Flatpak.

## How do I fix CVE-2024-32462?

Upgrade to a fixed version.

## Is CVE-2024-32462 being exploited?

There is no known exploitation of CVE-2024-32462 in the wild and no public exploit code.

Public exploit code:

- CVE-2024-32462 code exec sbx escape (github_poc): https://github.com/SpiralBL0CK/CVE-2024-32462

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-32462 and fix it if it is affected.

What it is: CVE-2024-32462 is a high-severity command injection vulnerability in Fedoraproject Fedora, published on 18 Apr 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2024-32462 in the wild and no public exploit code.

Affected product: Fedoraproject Fedora. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-32462/ (Markdown: https://insights.sbomify.com/CVE-2024-32462/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-32462
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-32462
- OSV: https://osv.dev/vulnerability/CVE-2024-32462

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-32462/
Summaries are generated and may contain mistakes; the official description above is the record.
