CVE-2021-44731
snapd could be made to escalate privileges and run programs as administrator
Reported by canonical · Published February 17, 2022
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
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| snapd | canonical | 2.54.2 |
| snapd | Canonical Ltd. | 2.54.2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Canonical Ltd. | snapd | unspecified |
| Canonical Ltd. | snapd | * |
Timeline
- Feb 17, 2022 CVE Published
- Feb 18, 2022 EPSS Score (30 in total, the first dated here)
- Dec 10, 2022 PoC Published
- Aug 4, 2024 CVE Updated
- Mar 10, 2026 Distribution Patch (2 in total, the first dated here)
- Mar 10, 2026 Security Advisory (3 in total, the first dated here)
- Jul 16, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2021-44731
vulnetix vdb fixes CVE-2021-44731
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-44731/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- [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