snapd could be made to escalate privileges and run programs as administrator
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- No fix listed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA.
Summary
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
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Canonical | snapd | up to 2.54.2 | — | No fix listed | CNA |
- snapd VendorCanonical Affected up to 2.54.2 Fixed in — No fix listed CNA
CPE configurations NVD · 8
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:canonical:snapd:*:*:*:*:*:*:*:* | up to 2.54.2 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* | 18.04 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:* | 20.04 | Vulnerable | Canonical |
| cpe:2.3:o:canonical:ubuntu_linux:21.10:*:*:*:*:*:*:* | 21.10 | Vulnerable | Canonical |
| cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* | 34 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
| cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* | 10.0 | Vulnerable | Debian |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
- cpe:2.3:a:canonical:snapd:*:*:*:*:*:*:*:* Versions up to 2.54.2 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* Versions 18.04 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:20.04:*:*:*:lts:*:*:* Versions 20.04 Vulnerable ·Canonical
- cpe:2.3:o:canonical:ubuntu_linux:21.10:*:*:*:*:*:*:* Versions 21.10 Vulnerable ·Canonical
- cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:* Versions 34 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:* Versions 10.0 Vulnerable ·Debian
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
Remediation
No fixed version listed by the sources yet.
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Advisory ·
Canonical snapd — FEDORA-2022-82bea71e5a
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2021-20244 snapd could be made to escalate privileges and run programs as administratorPriority LOW 38
- TI-2021-02996 snapd could be made to bypass intended access restrictions through snap content interfaces and layout pathsPriority LOW 36
- Advisory ·
Canonical snapd — FEDORA-2022-5df8b52ba4
3 records Highest priority Priority LOW 3 LOW
Other records, highest priority first
- TI-2021-20244 snapd could be made to escalate privileges and run programs as administratorPriority LOW 38
- TI-2021-02996 snapd could be made to bypass intended access restrictions through snap content interfaces and layout pathsPriority LOW 36
Show 1 more group
- Advisory ·
Canonical snapd — DSA-5080
2 records Highest priority Priority LOW 2 LOW
Other records, highest priority first
- TI-2021-20244 snapd could be made to escalate privileges and run programs as administratorPriority LOW 38
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2021-44731
- 2026-10-03 Alias added: GHSA-m3j9-xfh2-hrgc
References
Exploit 4
- [oss-security] 20220223 Re: CVE-2021-44731: Race condition in snap-confine's setup_private_mount()
- [oss-security] 20221130 Race condition in snap-confine's must_mkdir_and_open_with_perms() (CVE-2022-3328)
- 20221208 Race condition in snap-confine's must_mkdir_and_open_with_perms() (CVE-2022-3328)
- http://packetstormsecurity.com/files/170176/snap-confine-must_mkdir_and_open_with_perms-Race-Condition.html
More Canonical Snapd vulnerabilities
- TI-2023-01437 Injection in Canonical snapd CVSS 3.1CRITICAL 10.0
- TI-2019-05192 Local privilege escalation via snapd socket CVSS 3.1CRITICAL 9.8
- TI-2024-01603 snapd allows $HOME/bin symlink CVSS 3.1HIGH 8.2
- TI-2024-04773 Improper input validation in Canonical snapd CVSS 3.1HIGH 8.1
- TI-2020-16634 Improper privilege management in Canonical snapd CVSS 3.1CRITICAL 9.3
- TI-2019-05191 Snapd seccomp filter TIOCSTI ioctl bypass CVSS 3.1HIGH 7.5
Sources
- CVE-2021-44731 · CVE Program
- CVE-2021-44731 · NVD
- FIRST EPSS
- GHSA-m3j9-xfh2-hrgc · GitHub Advisory Database · CC BY 4.0
- CVE-2021-44731 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences