Exploit database

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:H

Description

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 Program

Exploit source choices

8 sources
Local Privilege Escalation in snapd
MSF-linux--local--cve_2026_3888MetasploitLinux / remotePreferred

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.

2026-03-17cve_2026_3888.rb
noambouillet/cve-2026-3888
GH-f5d3520b1c3d31532c499700cc56daccGitHubUnofficial GitHub source

Linux LPE via snap-confine + systemd-tmpfiles, explained in depth

2026-03-238 files · 5 stars
netw0rk7/cve-2026-3888-poc
GH-96c953daa3ca62f8bfcb58329eda9abdGitHubUnofficial GitHub source

netw0rk7/cve-2026-3888-poc source repository

2026-03-203 files · 3 stars
hewhomusntbenamed/cve-2026-3888-fixed
GH-a9df233f029c659d668a04dc04237908GitHubUnofficial GitHub source

CVE-2026-3888 — snap-confine / systemd-tmpfiles SUID LPE (fixed race_pid.txt issue)

2026-05-125 files · 1 stars
alinpfan/cve-2026-3888-poc
GH-3049ae749adfdfe60abcd1a2a219a161GitHubUnofficial GitHub source

CVE-2026-3888 PoC; discovered by the Qualys Threat Research Unit (TRU).

2026-10-122 files · 0 stars