CVE-2023-28100 Overview
CVE-2023-28100 is an input validation vulnerability [CWE-20] in Flatpak, a system for building, distributing, and running sandboxed desktop applications on Linux. The flaw affects Flatpak versions prior to 1.10.8, 1.12.8, 1.14.4, and 1.15.4. A malicious Flatpak application running on a Linux virtual console can abuse the TIOCLINUX ioctl command to copy text from the virtual console and paste it into the command buffer. After the Flatpak app exits, the injected text can execute as a shell command in the parent session. The vulnerability is conceptually similar to CVE-2017-5226, which used the TIOCSTI ioctl.
Critical Impact
A sandboxed Flatpak application can break out of the sandbox boundary on Linux virtual consoles (/dev/tty1, /dev/tty2, etc.) and inject commands that execute in the user's shell after the app terminates.
Affected Products
- Flatpak versions prior to 1.10.8
- Flatpak versions 1.11.0 through 1.12.7 and 1.13.0 through 1.14.3
- Flatpak development versions prior to 1.15.4
Discovery Timeline
- 2023-03-16 - CVE-2023-28100 published to the National Vulnerability Database (NVD)
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2023-28100
Vulnerability Analysis
Flatpak provides sandboxing for desktop applications, isolating them from the host system. The vulnerability arises when a Flatpak application is launched from a Linux virtual console such as /dev/tty1. The sandbox does not block the TIOCLINUX ioctl, which the kernel exposes only on Linux virtual consoles. A malicious application inside the sandbox can issue this ioctl to manipulate the console's selection and paste buffer. The attacker copies arbitrary text into the buffer and arranges for it to be pasted into the shell prompt after the Flatpak process exits. Ordinary graphical terminal emulators such as xterm, gnome-terminal, and Konsole are not affected because they do not implement the TIOCLINUX interface.
Root Cause
The root cause is missing filtering of the TIOCLINUX ioctl call within the Flatpak sandbox seccomp policy. An earlier fix for CVE-2017-5226 blocked TIOCSTI but did not cover TIOCLINUX, which provides similar text injection primitives on virtual consoles. The patch in commit 8e63de9a7d3124f91140fc74f8ca9ed73ed53be9 extends the seccomp filter to deny TIOCLINUX as well.
Attack Vector
Exploitation requires local access and a low-privilege user running a malicious or compromised Flatpak application on a Linux virtual console. The attacker's application invokes ioctl(fd, TIOCLINUX, ...) against the controlling terminal to manipulate the console selection and inject characters into the input buffer. When the Flatpak application terminates and control returns to the parent shell, the staged input is processed as user-typed commands. The scope is changed because the injected commands execute outside the Flatpak sandbox in the calling user's shell context.
No public proof-of-concept code is referenced in the advisory. Technical details are described in the Flatpak GitHub Security Advisory GHSA-7qpw-3vjv-xrqp and the corresponding upstream commit.
Detection Methods for CVE-2023-28100
Indicators of Compromise
- Unexpected shell commands appearing in a user's session immediately after a Flatpak application exits on a virtual console (/dev/tty1 through /dev/tty6)
- Flatpak processes launched from a TTY device path matching /dev/tty[1-6] rather than a pseudo-terminal (/dev/pts/*)
- Audit log entries showing ioctl syscalls with the TIOCLINUX (0x541C) request issued from within a Flatpak sandbox
Detection Strategies
- Enable Linux auditd rules to record ioctl syscalls and filter for the TIOCLINUX request code originating from bwrap or flatpak-spawned processes.
- Inventory installed Flatpak versions across Linux hosts and flag any host running a version older than 1.10.8, 1.12.8, 1.14.4, or 1.15.4.
- Correlate process execution telemetry to identify Flatpak launches whose controlling terminal is a Linux virtual console rather than a graphical terminal emulator.
Monitoring Recommendations
- Centralize Linux host telemetry, including process, syscall, and package inventory events, in a SIEM or data lake for cross-host queries.
- Alert on installation or downgrade of Flatpak packages to versions known to be vulnerable.
- Track use of virtual consoles in environments where workstations are expected to operate exclusively in Wayland or X11 graphical sessions.
How to Mitigate CVE-2023-28100
Immediate Actions Required
- Upgrade Flatpak to version 1.10.8, 1.12.8, 1.14.4, 1.15.4, or later on all Linux hosts.
- Restrict interactive user logins on Linux virtual consoles where Flatpak applications might be launched.
- Audit installed Flatpak applications and remove untrusted sources from the configured remotes.
Patch Information
A patch is available in Flatpak versions 1.10.8, 1.12.8, 1.14.4, and 1.15.4. The fix is implemented in upstream commit 8e63de9 and is documented in GHSA-7qpw-3vjv-xrqp. Distribution-level patches are also available through the Gentoo GLSA 202312-12 advisory and the corresponding oss-security mailing list announcement.
Workarounds
- Do not run Flatpak applications from a Linux virtual console such as /dev/tty1 or /dev/tty2; use a Wayland or X11 graphical session instead.
- Where graphical sessions are unavailable, run Flatpak inside a pseudo-terminal (for example, within tmux or screen started from a graphical terminal) so the TIOCLINUX ioctl is not exposed.
- Limit which users can switch to virtual consoles by adjusting logind and PAM configuration on multi-user systems.
# Configuration example: verify and upgrade Flatpak to a patched release
flatpak --version
# Debian/Ubuntu
sudo apt update && sudo apt install --only-upgrade flatpak
# Fedora/RHEL
sudo dnf upgrade flatpak
# Gentoo (per GLSA 202312-12)
sudo emerge --ask --oneshot --verbose ">=sys-apps/flatpak-1.14.4"
# Confirm the installed version is 1.10.8, 1.12.8, 1.14.4, 1.15.4 or later
flatpak --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

