The `snap-confine` in some Ubuntu versions is vulnerable to race condition, when setting up snap sandbox and creating mimic of /usr/lib/x86_64-linux-gnu. The snapd package is vulnerable up to version 2.74.1+ubuntu26.04.3 - however, each minor version has its own patch. The time window between creating bind-mounted copies of real libraries and copying them into sandbox /usr/lib/x86_64-linux-gnu allows the attacker to take control of content of those libraries by recreating /tmp/.snap folder. This folder is owned by root, but it's auto-deleted after 30 days without activity (by default on Ubuntu 24.04+). The attacker can recreate this folder once it is deleted and take over the sandboxed libraries. After gaining root inside sandbox, it can escape the sandbox by copying setuid binary into host filesystem.
Vulnerability
CVE-2026-3888
Local Privilege Escalation in snapd
Vulnerability details
- Score
- 7.8
- Severity
- high
CVSS 3.1 · canonical
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:HDescription
Local privilege escalation in snapd on Linux allows local attackers to get root privilege by re-creating snap's private /tmp directory when systemd-tmpfiles is configured to automatically clean up this directory. This issue affects Ubuntu 16.04 LTS, 18.04 LTS, 20.04 LTS, 22.04 LTS, and 24.04 LTS.
CVE ProgramExploit source choices
8 sourcesthecybergeek/cve-2026-3888-snap-confine-systemd-tmpfiles-lpe source repository
Linux LPE via snap-confine + systemd-tmpfiles, explained in depth
netw0rk7/cve-2026-3888-poc source repository
PoC de CVE-2026-3888: condicion de carrera en snapd para escalada a root.
Exploit para CVE-2026-3888: race condition en snap-confine con hijack del loader para escalar a root en Linux.
CVE-2026-3888 — snap-confine / systemd-tmpfiles SUID LPE (fixed race_pid.txt issue)
CVE-2026-3888 PoC; discovered by the Qualys Threat Research Unit (TRU).