CVE-2024-5300 AppArmor Base Profile Misconfiguration in snapd Permits Confined Snaps Unauthorized Access to Hashed Passwords via systemd-userdbd
- Published
- Updated
- Exploit status
- No public exploit known
Description
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/snapd(Debian:12) | All versions | No fix listed |
| debian/snapd(Debian:12) | = 2.57.6-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.57.6-1+deb12u1 | No fix listed |
| debian/snapd(Debian:12) | = 2.59.5-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.60.2-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.61.1-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.61.2-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.61.2-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.62-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.62-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.62-3 | No fix listed |
| debian/snapd(Debian:12) | = 2.62-4 | No fix listed |
| debian/snapd(Debian:12) | = 2.62-5 | No fix listed |
| debian/snapd(Debian:12) | = 2.63-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.63-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.63-3 | No fix listed |
| debian/snapd(Debian:12) | = 2.63-4 | No fix listed |
| debian/snapd(Debian:12) | = 2.65.1-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.65.3-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.66.1-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.66.1-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.67-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.68.3-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.68.3-3 | No fix listed |
| debian/snapd(Debian:12) | = 2.71-1 | No fix listed |
Show 47 more
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/snapd(Debian:12) | = 2.71-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.71-3 | No fix listed |
| debian/snapd(Debian:12) | = 2.72-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.73-3 | No fix listed |
| debian/snapd(Debian:12) | = 2.73-4 | No fix listed |
| debian/snapd(Debian:12) | = 2.74.1-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.75.2-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.75.2-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.76-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.76.3-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.76.3-2 | No fix listed |
| debian/snapd(Debian:12) | = 2.77.1-1 | No fix listed |
| debian/snapd(Debian:12) | = 2.77.1-2 | No fix listed |
| debian/snapd(Debian:13) | All versions | No fix listed |
| debian/snapd(Debian:13) | = 2.68.3-3 | No fix listed |
| debian/snapd(Debian:13) | = 2.68.3-3+deb13u1 | No fix listed |
| debian/snapd(Debian:13) | = 2.71-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.71-2 | No fix listed |
| debian/snapd(Debian:13) | = 2.71-3 | No fix listed |
| debian/snapd(Debian:13) | = 2.72-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.73-3 | No fix listed |
| debian/snapd(Debian:13) | = 2.73-4 | No fix listed |
| debian/snapd(Debian:13) | = 2.74.1-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.75.2-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.75.2-2 | No fix listed |
| debian/snapd(Debian:13) | = 2.76-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.76.3-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.76.3-2 | No fix listed |
| debian/snapd(Debian:13) | = 2.77.1-1 | No fix listed |
| debian/snapd(Debian:13) | = 2.77.1-2 | No fix listed |
| debian/snapd(Debian:14) | < 2.76.3-1 | 2.76.3-1 |
| debian/snapd(Debian:14) | = 2.68.3-3 | No fix listed |
| debian/snapd(Debian:14) | = 2.71-1 | No fix listed |
| debian/snapd(Debian:14) | = 2.71-2 | No fix listed |
| debian/snapd(Debian:14) | = 2.71-3 | No fix listed |
| debian/snapd(Debian:14) | = 2.72-1 | No fix listed |
| debian/snapd(Debian:14) | = 2.73-3 | No fix listed |
| debian/snapd(Debian:14) | = 2.73-4 | No fix listed |
| debian/snapd(Debian:14) | = 2.74.1-1 | No fix listed |
| debian/snapd(Debian:14) | = 2.75.2-1 | No fix listed |
| debian/snapd(Debian:14) | = 2.75.2-2 | No fix listed |
| debian/snapd(Debian:14) | = 2.76-1 | No fix listed |
| redhat/systemd-main(Red Hat:hummingbird:1) | < 261-2.hum1 | 261-2.hum1 |
| ubuntu/snapd(Ubuntu:22.04) | < 2.76+ubuntu22.04.1 | 2.76+ubuntu22.04.1 |
| snapd | < 2.76.1 | 2.76.1 |
| ubuntu/snapd(Ubuntu:24.04) | < 2.76+ubuntu24.04.1 | 2.76+ubuntu24.04.1 |
| ubuntu/snapd(Ubuntu:26.04) | < 2.76+ubuntu26.04.3 | 2.76+ubuntu26.04.3 |
References
- Debian Security Tracker CVE-2024-5300 vendor-advisory
- Red Hat CVE page vendor-advisory
- RHSA-2026:29009 patch vendor-advisory
- Red Hat Bugzilla 2503660 issue-tracking
- www.cve.org
- nvd.nist.gov
- Ubuntu CVE tracker issue-tracking vdb-entry vendor-advisory
- USN-8579-1 vendor-advisory
- bugs.debian.org issue-tracking