CVE-2026-133842 in Red Hatinfo

Summary

by MITRE • 11/27/2026

A flaw was found in Flatpak’s flatpak-system-helper. When a system-wide app, runtime, or extension uses the extra-data mechanism and its apply_extra logic creates a deeply nested directory tree, permission canonicalization can fail (for example with EMFILE). Affected Flatpak versions can still report success without clearing setuid/setgid bits, leaving a setuid-root executable under /var/lib/flatpak. A local attacker who can install or update such content system-wide, or who can already execute code as a local user in cooperation with that content, can escalate privileges to root.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/27/2026

The vulnerability identified within Flatpak’s flatpak-system-helper component represents a critical privilege escalation flaw rooted in improper permission canonicalization during the handling of extra-data mechanisms. This issue specifically affects system-wide applications, runtimes, or extensions where the apply_extra logic is invoked to manage large binary payloads that are downloaded and extracted separately from the main application bundle. The core technical failure occurs when this extraction process generates a deeply nested directory structure under /var/lib/flatpak. In such scenarios, the operating system may encounter resource limits, specifically resulting in an EMFILE error indicating too many open files. Instead of failing securely or rolling back changes to maintain integrity, the helper incorrectly reports success while leaving behind executable binaries with setuid and setgid bits intact. This behavior violates fundamental security principles regarding file permission management during installation processes, allowing unprivileged users to retain elevated privileges on newly created system-level executables.

From a technical perspective, this flaw aligns closely with CWE-250, which describes execution with unnecessary privileges, and CWE-732, concerning incorrect permission assignment for critical resources. The root cause lies in the failure of the flatpak-system-helper to properly sanitize file modes after encountering filesystem errors during directory creation or extraction. When the system hits limits on open file descriptors due to deep nesting, the helper does not enforce a secure default state such as removing execute permissions or clearing setuid bits before finalizing the installation transaction. Consequently, any binary extracted under these conditions remains executable with root privileges if it originally possessed those attributes in its metadata. This creates a persistent backdoor within the system’s package management layer, effectively bypassing standard user privilege boundaries and allowing local attackers to gain full control over the host operating system by simply installing or updating maliciously crafted content that triggers this specific code path.

The operational impact of this vulnerability is severe, as it enables arbitrary local privilege escalation from a standard unprivileged user account to root level without requiring any additional external exploits or network access. An attacker who has the ability to install or update flatpak packages system-wide can deliberately construct payloads with deeply nested directory structures in their extra-data sections. Upon execution of the installation process by the privileged helper, the resulting binaries will retain setuid-root permissions. This allows the attacker to execute these binaries as root at any subsequent time, effectively compromising the entire host system. Furthermore, if an attacker already possesses code execution capabilities within a sandboxed flatpak environment that has access to install or update content, they can cooperate with such content to trigger this vulnerability remotely through social engineering or compromised repositories. This significantly lowers the barrier for attack and expands the threat surface beyond traditional network-based exploits to include local installation vectors.

Mitigation strategies must address both immediate remediation and long-term architectural improvements. The primary defense is to apply vendor-provided patches that update flatpak-system-helper to correctly handle EMFILE errors by ensuring all setuid/setgid bits are cleared upon failure or completion of the extraction process, regardless of success status reported to higher-level processes. Administrators should restrict who has permission to install system-wide flatpak packages, limiting this capability to trusted administrators only. Additionally, enabling strict sandboxing policies for applications that utilize extra-data mechanisms can reduce the risk of exploitation by isolating potential malicious payloads from critical system directories until they are verified as safe. Monitoring /var/lib/flatpak for unexpected setuid binaries and auditing installation logs for EMFILE errors can aid in early detection of attempted exploits. Ultimately, resolving this issue requires enforcing secure defaults where file permissions are explicitly reset to non-privileged states after any filesystem operation involving executable content, thereby preventing the persistence of elevated privileges through packaging artifacts.

Responsible

Redhat

Reservation

11/20/2026

Disclosure

11/27/2026

Moderation

accepted

CPE

ready

EPSS

0.00225

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!