A high-severity vulnerability in default Ubuntu Desktop installations starting from version 24.04 allows local users to gain full root access by exploiting a flaw in how system components interact. By manipulating the timing of temporary file cleanup processes, an attacker can bypass security sandboxes to execute malicious code with administrative privileges.
Security researchers have identified a significant privilege escalation flaw, tracked as CVE-2026-3888, which impacts modern versions of Ubuntu Desktop. The vulnerability arises from an unexpected interaction between snap-confine, a tool used to secure application sandboxes, and systemd-tmpfiles, which manages the deletion of old temporary data. Under specific conditions, an unprivileged user can exploit the way these two services handle system directories to take complete control of the host machine.
The exploitation process relies on a time-based window where the system's cleanup daemon removes a critical directory required by the snap infrastructure. In Ubuntu 24.04, this typically occurs after 30 days of uptime, while later versions have a shorter threshold of 10 days. Once the system deletes the target directory, a local attacker can recreate it and fill it with malicious payloads, waiting for the system to inadvertently grant those files elevated permissions.
When the snap-confine utility next initializes a sandbox, it performs a mount operation on the attacker-controlled directory using root authority. Because the utility does not properly verify the state of the directory after the cleanup cycle, it ends up mounting the malicious files into a privileged context. This allows the attacker to execute arbitrary code as the root user, effectively bypassing all standard user restrictions and security boundaries.
Beyond the primary snapd flaw, researchers also discovered a secondary race condition within the uutils coreutils package. This separate issue allows an attacker to replace directory entries with symbolic links during routine system maintenance tasks performed by the root user. If successfully exploited, this secondary flaw could lead to the unauthorized deletion of system files or provide an alternative path for gaining administrative control over the operating system.
Developers have already released patches to address these security concerns across all affected versions, including Ubuntu 24.04 LTS and the current development releases. The temporary fix for the coreutils issue involved reverting the default system commands to more stable versions while upstream fixes were finalized. Users are strongly encouraged to update their snapd packages to the latest versions to protect their systems from potential exploitation.
Source: Ubuntu CVE-2026-3888 Flaw Allows Root Access Via Systemd Cleanup Timing



