Description
A race condition existed in the snapd 2.54.2 snap-confine binary when preparing a private mount namespace for a snap. This could allow a local attacker to gain root privileges by bind-mounting their own contents inside the snap's private mount namespace and causing snap-confine to execute arbitrary code and hence gain privilege escalation. Fixed in snapd versions 2.54.3+18.04, 2.54.3+20.04 and 2.54.3+21.10.1
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Canonical | snapd | unspecified – ≤ 2.54.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | snapd | 2.54.3-1 | — |
| Debian 13 | snapd | 2.54.3-1 | — |
| Debian 12 | snapd | 2.54.3-1 | — |
| Debian 11 | snapd | 2.49-1+deb11u1 | DSA-5080-1 |
| Debian 10 | snapd | 2.37.4-1+deb10u1 | DSA-5080-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | snapd | 2.54.3+20.04.1 | USN-5292-2, USN-5292-1 |
| Ubuntu 18.04 LTS | snapd | 2.54.3+18.04 | USN-5292-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 16.04 LTS | snapd | 2.54.3+16.04~esm2 | USN-5292-3 |
| Ubuntu Pro 14.04 LTS | snapd | 2.54.3+14.04~esm1 | USN-5292-3 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 1 repository
-
deeexcee-io/CVE-2021-44731-snap-confine-SUID ★ 4 · Jul 9, 2023
Local Privilege Escalation Exploit for CVE-2021-44731
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 4
- USN-5292-3 snapd vulnerabilities Ubuntu Security Notices (USN) · Jun 29, 2026
- DSA-5080-1 snapd - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-5292-1 snapd vulnerabilities Ubuntu Security Notices (USN) · Feb 10, 2026
- USN-5292-2 snapd vulnerabilities Ubuntu Security Notices (USN) · Feb 10, 2026
References
- https://ubuntu.com/security/notices/USN-5292-1
- [oss-security] 20220218 CVE-2021-4120: Insufficient validation of snap content interface and layout paths mailing-list
- FEDORA-2022-82bea71e5a vendor-advisory
- FEDORA-2022-5df8b52ba4 vendor-advisory
- DSA-5080 vendor-advisory
- [oss-security] 20220223 Re: CVE-2021-44731: Race condition in snap-confine's setup_private_mount() mailing-list
- [oss-security] 20220223 Re: CVE-2021-44731: Race condition in snap-confine's setup_private_mount() mailing-list
- [oss-security] 20221130 Race condition in snap-confine's must_mkdir_and_open_with_perms() (CVE-2022-3328) mailing-list
- 20221208 Race condition in snap-confine's must_mkdir_and_open_with_perms() (CVE-2022-3328) mailing-list
- http://packetstormsecurity.com/files/170176/snap-confine-must_mkdir_and_open_with_perms-Race-Condition.html