CVE-2024-5300AppArmor Base Profile Misconfiguration in snapd Permits Confined Snaps Unauthorized…
An access control bypass and information disclosure vulnerability exists in the base AppArmor security profile configuration of Canonical snapd. The abstraction rules located in /etc/apparmor.d/abstractions/nss-systemd (inherited via ) inadvertently permit strictly confined snap applications, which lack the privileged account-control interface, to interact directly with the io.systemd.Multiplexer and io.systemd.NameServiceSwitch UNIX domain sockets under /run/systemd/userdb/. On systems where the systemd-userdbd service is installed and operational, the service fails to distinguish between an unconfined root user on the host system and a restricted root user running within a snap application's sandbox (such as a daemon or configuration hook). Because systemd-userdbd returns "complete" user records—including sensitive hashed user passwords from /etc/shadow—when queried by a process running as root, a compromised or malicious strictly confined snap executing code as root can successfully query the Varlink interface to retrieve all system password hashes, bypassing intended snap sandbox restrictions. This issue is mitigated by the fact that systemd-userdbd is not installed by default on standard Ubuntu deployments.
What to do
Fixed builds are available from Debian, Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | snapd | Fixed | 2.76+ubuntu26.04.3 | UBUNTU-CVE-2024-5300 |
| Ubuntu 25.10 | snapd | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-5300 | |
| Ubuntu 24.04 | snapd | Fixed | 2.76+ubuntu24.04.1 | UBUNTU-CVE-2024-5300 |
| Ubuntu 22.04 | snapd | Fixed | 2.76+ubuntu22.04.1 | UBUNTU-CVE-2024-5300 |
| Ubuntu 20.04 | snapd | Fix pending | 2.67.1+20.04ubuntu1~esm3 (Ubuntu Pro) | UBUNTU-CVE-2024-5300 |
| Ubuntu 18.04 | snapd | Fix pending | 2.61.4ubuntu0.18.04.1+esm4 (Ubuntu Pro) | UBUNTU-CVE-2024-5300 |
| Ubuntu 16.04 | snapd | Fix pending | 2.61.4ubuntu0.16.04.1+esm4 (Ubuntu Pro) | UBUNTU-CVE-2024-5300 |
| Debian 14 | snapd | Fixed | 2.76.3-1 | DEBIAN-CVE-2024-5300 |
| Debian 13 | snapd | Fix pending | DEBIAN-CVE-2024-5300 | |
| Debian 12 | snapd | Fix pending | DEBIAN-CVE-2024-5300 |
What the vendor says
As published in the CVE record by canonical, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- snapd: affected: before 2.76.1; fixed in
2.76.1 - Canonical Ubuntu 26.04 LTS: affected: 2.76+ubuntu26.04.3 not affected
- Canonical Ubuntu 24.04 LTS: affected: 2.76+ubuntu24.04.1 not affected
- Canonical Ubuntu 22.04 LTS: affected: 2.76+ubuntu22.04.1 not affected
- Canonical Ubuntu 20.04 LTS: affected: 2.67.1+20.04ubuntu1~esm2 not affected
- Canonical Ubuntu 18.04 LTS: affected: 2.61.4ubuntu0.18.04.1+esm3 not affected
- Canonical Ubuntu 16.04 LTS: affected: 2.61.4ubuntu0.16.04.1+esm3 not affected
References
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.