CVE-2026-3888: Important Snap Flaw Enables Local Privilege Escalation to Root
A local unprivileged attacker on default Ubuntu Desktop 24.04 and later can escalate to root because snap-confine bind-mounts files from a /tmp directory that systemd-tmpfiles eventually deletes, letting the attacker recreate it with malicious content. The attacker must wait for the cleanup timer (10–30 days) before the next sandbox initialisation executes their code as root.
blog.qualys.com
Published on blog.qualys.com
The Qualys Threat Research Unit has identified a Local Privilege Escalation (LPE) vulnerability affecting default installations of Ubuntu Desktop version 24.04 and later. This flaw (CVE-2026-3888) allows an unprivileged local attacker to escalate privileges to full root access through the interaction of two standard…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a time-of-check/time-of-use flaw: snap-confine trusts a predictable directory under /tmp that an unprivileged user can recreate after systemd-tmpfiles removes it, so attacker-controlled files are bind-mounted as root.
Impact
A successful exploit gives the local attacker full root access and a complete compromise of the host, though the attack complexity is high because of the required waiting window.
What the attacker needed
Local unprivileged access to the host; default Ubuntu Desktop 24.04 or later; wait 10–30 days for the cleanup timer
The fix
It was fixed by upgrading snapd to the patched versions listed for each Ubuntu release.
How it was found
- Wait for systemd-tmpfiles to delete the /tmp/.snap directory (30 days on 24.04, 10 days on later versions).
- Recreate the deleted directory and place malicious payloads inside it.
- Trigger the next snap sandbox initialisation so snap-confine bind-mounts the files as root and executes the attacker's code.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
On Ubuntu, a privileged helper called snap-confine sets up a sandbox for snap apps and copies some files from a temporary folder into that sandbox as the root user. A separate cleanup service deletes old temporary folders after a set time. If an ordinary user recreates that folder with their own files after it is deleted, the privileged helper will treat those files as trusted and run them with full administrator rights.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.